Skip to content
Permalink
Browse files

Merge pull request #263 from kborchers/bug_4995

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
  • Loading branch information...
scottgonzalez committed May 13, 2011
2 parents 2adfc03 + 331c460 commit c9e187cd9d3cecdb39ecfb0ab0389614973a40c3
Showing with 3 additions and 3 deletions.
  1. +3 −3 ui/jquery.ui.dialog.js
@@ -281,10 +281,10 @@ $.widget("ui.dialog", {
options = self.options,
uiDialog = self.uiDialog;

self.overlay = options.modal ? new $.ui.dialog.overlay( self ) : null;
self._size();
self._position( options.position );
uiDialog.show( options.show );
self.overlay = options.modal ? new $.ui.dialog.overlay( self ) : null;
self.moveToTop( true );

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

8 comments on commit c9e187c

@ssvsathish

This comment has been minimized.

Copy link

replied Jul 6, 2012

I tried to download the code and used this file "jquery.ui.dialog.js" but it does not fix the 'Huge Content' issue on the IE. Can you please list out the steps of how can this file be used in our projects or is this issue really fixed ?

@scottgonzalez

This comment has been minimized.

Copy link
Member Author

replied Jul 6, 2012

@ssvsathish Please create a test page using http://code.jquery.com/ui/jquery-ui-git.js and http://code.jquery.com/ui/jquery-ui-git.css that shows the problem.

@ssvsathish

This comment has been minimized.

Copy link

replied Jul 6, 2012

@scottgonzalez

This comment has been minimized.

Copy link
Member Author

replied Jul 6, 2012

@ssvsathish Your test case is broken, but I can confirm that the overlay is disappearing in IE8: http://jsfiddle.net/ErAyw/

@ssvsathish

This comment has been minimized.

Copy link

replied Jul 6, 2012

Nope, not exactly. Firstly, html is what is rendered, so thats why I attached the simple HTML before. But to your point, may be increase the height a little bit. Please give a try now on http://jsfiddle.net/ErAyw/1/ using IE8. You will still see the issue.

@scottgonzalez

This comment has been minimized.

Copy link
Member Author

replied Jul 6, 2012

@ssvsathish

This comment has been minimized.

Copy link

replied Jul 6, 2012

Thanks, Scott ! Therefore, this issue is not fixed yet. Instead do you suggest to follow the work around suggested in this ticket : http://bugs.jqueryui.com/ticket/5177 or do you have any better solution to this ?

@scottgonzalez

This comment has been minimized.

Copy link
Member Author

replied Jul 6, 2012

If we had a better solution we would implement it :-P

Please sign in to comment.
You can’t perform that action at this time.