]> source.dussan.org Git - jquery-ui.git/commitdiff
Dialog: Don't hide the dialog in _size if it started visible. Fixes #6717 - Dialog...
authorScott González <scott.gonzalez@gmail.com>
Fri, 3 Dec 2010 13:31:06 +0000 (08:31 -0500)
committerScott González <scott.gonzalez@gmail.com>
Fri, 3 Dec 2010 13:31:06 +0000 (08:31 -0500)
ui/jquery.ui.dialog.js

index c2d5d3e16c095f2298e3957ca1437e33f6fe87b8..81df1d19b3840b944deaf5b8e738936d082dd5d6 100644 (file)
@@ -633,7 +633,8 @@ $.widget("ui.dialog", {
                 */
                var options = this.options,
                        nonContentHeight,
-                       minContentHeight;
+                       minContentHeight,
+                       isVisible = this.uiDialog.is( ":visible" );
 
                // reset content sizing
                this.element.show().css({
@@ -665,7 +666,9 @@ $.widget("ui.dialog", {
                        } else {
                                this.uiDialog.show();
                                var autoHeight = this.element.css( "height", "auto" ).height();
-                               this.uiDialog.hide();
+                               if ( !isVisible ) {
+                                       this.uiDialog.hide();
+                               }
                                this.element.height( Math.max( autoHeight, minContentHeight ) );
                        }
                } else {