Skip to content

Commit 331c460

Browse files
committed
Dialog: Create modal overlay after dialog is shown and check scrollHeight and offsetHeight in all IE versions. Fixed #4995 - Modal Dialog's overlay dissapears in IE when content is tall
1 parent 1845015 commit 331c460

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ui/jquery.ui.dialog.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -281,10 +281,10 @@ $.widget("ui.dialog", {
281281
options = self.options,
282282
uiDialog = self.uiDialog;
283283

284-
self.overlay = options.modal ? new $.ui.dialog.overlay( self ) : null;
285284
self._size();
286285
self._position( options.position );
287286
uiDialog.show( options.show );
287+
self.overlay = options.modal ? new $.ui.dialog.overlay( self ) : null;
288288
self.moveToTop( true );
289289

290290
// prevent tabbing out of modal dialogs
@@ -755,8 +755,8 @@ $.extend( $.ui.dialog.overlay, {
755755
height: function() {
756756
var scrollHeight,
757757
offsetHeight;
758-
// handle IE 6
759-
if ( $.browser.msie && $.browser.version < 7 ) {
758+
// handle IE
759+
if ( $.browser.msie ) {
760760
scrollHeight = Math.max(
761761
document.documentElement.scrollHeight,
762762
document.body.scrollHeight

0 commit comments

Comments
 (0)