forked from extern/egroupware
bind load handler to set overflow-y: auto on body of contentDocument to allow vertical scrolling
This commit is contained in:
parent
bc045bf0da
commit
133787f239
@ -249,6 +249,12 @@ window.fw_browser = (function(){ "use strict"; return Class.extend(
|
||||
self.iframe.setAttribute('allow', 'fullscreen');
|
||||
self.iframe.setAttribute('allowfullscreen', true); // for older browsers
|
||||
|
||||
// bind load handler to set overflow-y: auto on body of contentDocument to allow vertical scrolling
|
||||
self.iframe.addEventListener('load', (ev) => {
|
||||
const body = self.iframe.contentDocument.getElementsByTagName('body')[0];
|
||||
body.style.overflowY = 'auto';
|
||||
});
|
||||
|
||||
//Load the iframe content
|
||||
self.iframe.src = _url;
|
||||
|
||||
@ -265,7 +271,7 @@ window.fw_browser = (function(){ "use strict"; return Class.extend(
|
||||
}
|
||||
}
|
||||
catch (e) {
|
||||
// ignoer SecurityError: Blocked a frame ..., caused by different origin
|
||||
// ignore SecurityError: Blocked a frame ..., caused by different origin
|
||||
}
|
||||
}
|
||||
|
||||
@ -378,4 +384,4 @@ window.fw_browser = (function(){ "use strict"; return Class.extend(
|
||||
{
|
||||
this.browse('about:blank', this.type == EGW_BROWSER_TYPE_IFRAME);
|
||||
}
|
||||
});}).call(window);
|
||||
});}).call(window);
|
Loading…
Reference in New Issue
Block a user