mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Dialog: Make close() a noop if the dialog is already closed. Fixes #7327 - Dialog box size and close animation bugs.
This commit is contained in:
parent
981e96948f
commit
c7eae7b264
8
ui/jquery.ui.dialog.js
vendored
8
ui/jquery.ui.dialog.js
vendored
@ -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 );
|
||||
|
Loading…
Reference in New Issue
Block a user