Skip to content

Commit b9e34f7

Browse files
committed
Dialog: Don't hide the dialog in _size if it started visible. Fixes #6717 - Dialog: Adding a button makes the dialog disappear in IE6.
1 parent e01664a commit b9e34f7

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

ui/jquery.ui.dialog.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -633,7 +633,8 @@ $.widget("ui.dialog", {
633633
*/
634634
var options = this.options,
635635
nonContentHeight,
636-
minContentHeight;
636+
minContentHeight,
637+
isVisible = this.uiDialog.is( ":visible" );
637638

638639
// reset content sizing
639640
this.element.show().css({
@@ -665,7 +666,9 @@ $.widget("ui.dialog", {
665666
} else {
666667
this.uiDialog.show();
667668
var autoHeight = this.element.css( "height", "auto" ).height();
668-
this.uiDialog.hide();
669+
if ( !isVisible ) {
670+
this.uiDialog.hide();
671+
}
669672
this.element.height( Math.max( autoHeight, minContentHeight ) );
670673
}
671674
} else {

0 commit comments

Comments
 (0)