aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorDavid Murdoch <musicisair@yahoo.com>2011-05-26 19:29:11 -0400
committerScott González <scott.gonzalez@gmail.com>2011-05-26 19:29:11 -0400
commitc7eae7b264112919462cb1b8b7ce115d3b24265d (patch)
tree9417a54eeb919710462bb2377c2242d8d95d3e10 /ui
parent981e96948f45e5c5c32d005e379a5030c98c3d8d (diff)
downloadjquery-ui-c7eae7b264112919462cb1b8b7ce115d3b24265d.tar.gz
jquery-ui-c7eae7b264112919462cb1b8b7ce115d3b24265d.zip
Dialog: Make close() a noop if the dialog is already closed. Fixes #7327 - Dialog box size and close animation bugs.
Diffstat (limited to 'ui')
-rw-r--r--ui/jquery.ui.dialog.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/ui/jquery.ui.dialog.js b/ui/jquery.ui.dialog.js
index dc2849155..8d5f4f56f 100644
--- a/ui/jquery.ui.dialog.js
+++ b/ui/jquery.ui.dialog.js
@@ -190,6 +190,10 @@ $.widget("ui.dialog", {
},
close: function( event ) {
+ if ( !this._isOpen ) {
+ return self;
+ }
+
var self = this,
maxZ, thisZ;
@@ -197,13 +201,13 @@ $.widget("ui.dialog", {
return;
}
+ self._isOpen = false;
+
if ( self.overlay ) {
self.overlay.destroy();
}
self.uiDialog.unbind( "keypress.ui-dialog" );
- self._isOpen = false;
-
if ( self.options.hide ) {
self.uiDialog.hide( self.options.hide, function() {
self._trigger( "close", event );