diff options
author | Scott González <scott.gonzalez@gmail.com> | 2008-07-14 00:50:01 +0000 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2008-07-14 00:50:01 +0000 |
commit | dad128d84fa978be8efcadc318680968277c8813 (patch) | |
tree | caa619e2417b7c8539c8e58928dfc8f4e7a22a21 /ui/ui.dialog.js | |
parent | 30952e6b3f80da814e6d7ff633fc1eac0b3c4a13 (diff) | |
download | jquery-ui-dad128d84fa978be8efcadc318680968277c8813.tar.gz jquery-ui-dad128d84fa978be8efcadc318680968277c8813.zip |
Dialog: Fixed #3076: Proper sizing of overlays in Opera 9.51.
Diffstat (limited to 'ui/ui.dialog.js')
-rw-r--r-- | ui/ui.dialog.js | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/ui/ui.dialog.js b/ui/ui.dialog.js index 6cae66d87..54f65dd71 100644 --- a/ui/ui.dialog.js +++ b/ui/ui.dialog.js @@ -113,7 +113,7 @@ $.widget("ui.dialog", { uiDialogTitlebar.find("*").add(uiDialogTitlebar).each(function() { $.ui.disableSelection(this); }); - + if ($.fn.draggable) { uiDialog.draggable({ cancel: '.ui-dialog-content', @@ -433,6 +433,7 @@ $.extend($.ui.dialog.overlay, { }, height: function() { + // handle IE 6 if ($.browser.msie && $.browser.version < 7) { var scrollHeight = Math.max( document.documentElement.scrollHeight, @@ -448,12 +449,20 @@ $.extend($.ui.dialog.overlay, { } else { return scrollHeight + 'px'; } + // handle Opera + } else if ($.browser.opera) { + return Math.max( + window.innerHeight, + $(document).height() + ) + 'px'; + // handle "good" browsers } else { return $(document).height() + 'px'; } }, width: function() { + // handle IE 6 if ($.browser.msie && $.browser.version < 7) { var scrollWidth = Math.max( document.documentElement.scrollWidth, @@ -469,6 +478,13 @@ $.extend($.ui.dialog.overlay, { } else { return scrollWidth + 'px'; } + // handle Opera + } else if ($.browser.opera) { + return Math.max( + window.innerWidth, + $(document).width() + ) + 'px'; + // handle "good" browsers } else { return $(document).width() + 'px'; } |