Skip to content
Permalink
Browse files

Dialog: Make close() a noop if the dialog is already closed. Fixes #7…

…327 - Dialog box size and close animation bugs.
  • Loading branch information...
David Murdoch authored and scottgonzalez committed May 26, 2011
1 parent 981e969 commit c7eae7b264112919462cb1b8b7ce115d3b24265d
Showing with 6 additions and 2 deletions.
  1. +6 −2 ui/jquery.ui.dialog.js
@@ -190,20 +190,24 @@ $.widget("ui.dialog", {
},

close: function( event ) {
if ( !this._isOpen ) {
return self;
}

var self = this,
maxZ, thisZ;

if ( false === self._trigger( "beforeClose", event ) ) {
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 );

0 comments on commit c7eae7b

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