Commit fea716c0 authored by Julien Cigar's avatar Julien Cigar
Browse files

fix overlay

parent c738e97b
...@@ -37,9 +37,7 @@ ...@@ -37,9 +37,7 @@
this.frame.style.position = 'absolute'; this.frame.style.position = 'absolute';
if (this.options.overlay) { if (this.options.overlay) {
var window_size = Yeti.DOM.getWindowSize(), var window_size = Yeti.DOM.getWindowSize();
scroll_offset = Yeti.DOM.getScrollXY()
;
this.overlay = document.createElement('div') this.overlay = document.createElement('div')
this.overlay.style.top = 0 + 'px'; this.overlay.style.top = 0 + 'px';
...@@ -48,8 +46,11 @@ ...@@ -48,8 +46,11 @@
this.overlay.style.zIndex = this.frame.zIndex - 1; this.overlay.style.zIndex = this.frame.zIndex - 1;
Yeti.DOM.addClass(this.overlay, 'ui-frame-overlay'); Yeti.DOM.addClass(this.overlay, 'ui-frame-overlay');
this.overlay.style.width = window_size.width + scroll_offset.X + 'px'; this.overlay.style.width = Math.max(window_size.width,
this.overlay.style.height = window_size.height + scroll_offset.Y + 'px'; document.body.scrollWidth) + 'px';
this.overlay.style.height = Math.max(window_size.height,
document.body.scrollHeight) + 'px';
Yeti.Evt.bind(this.overlay, 'click', function() { Yeti.Evt.bind(this.overlay, 'click', function() {
_self.detach(); _self.detach();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment