diff options
-rw-r--r-- | ui/jquery.ui.dialog.js | 8 |
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 ); |