From d07074dc3c3b2c73ccf1ed1cb2876df31154e039 Mon Sep 17 00:00:00 2001 From: Jörn Zaefferer Date: Tue, 23 Oct 2012 11:09:04 -0400 Subject: Dialog: Use _show and _hide consistently. Fixes #4892 - Dialog: zIndex error with animated modal dialog. --- ui/jquery.ui.dialog.js | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'ui/jquery.ui.dialog.js') diff --git a/ui/jquery.ui.dialog.js b/ui/jquery.ui.dialog.js index 95b3d28a6..4188a38c0 100644 --- a/ui/jquery.ui.dialog.js +++ b/ui/jquery.ui.dialog.js @@ -255,14 +255,9 @@ $.widget("ui.dialog", { $( this.document[ 0 ].activeElement ).blur(); } - if ( this.options.hide ) { - this._hide( this.uiDialog, this.options.hide, function() { - that._trigger( "close", event ); - }); - } else { - this.uiDialog.hide(); - this._trigger( "close", event ); - } + this._hide( this.uiDialog, this.options.hide, function() { + that._trigger( "close", event ); + }); }, isOpen: function() { @@ -289,10 +284,9 @@ $.widget("ui.dialog", { this._size(); this._position( options.position ); - uiDialog.show( options.show ); this.overlay = options.modal ? new $.ui.dialog.overlay( this ) : null; - this.moveToTop( null, true ); + this._show( uiDialog, options.show ); // set focus to the first tabbable element in the content area or the first button // if there are no tabbable elements, set focus on the dialog itself -- cgit v1.2.3