aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJörn Zaefferer <joern.zaefferer@gmail.com>2012-10-23 11:09:04 -0400
committerJörn Zaefferer <joern.zaefferer@gmail.com>2012-10-24 17:03:00 -0400
commitd07074dc3c3b2c73ccf1ed1cb2876df31154e039 (patch)
treea3f64fe7362566383f4e4b99788a838f94463807
parent513b6da641941a54d17880e75d7558b53650f62f (diff)
downloadjquery-ui-d07074dc3c3b2c73ccf1ed1cb2876df31154e039.tar.gz
jquery-ui-d07074dc3c3b2c73ccf1ed1cb2876df31154e039.zip
Dialog: Use _show and _hide consistently. Fixes #4892 - Dialog: zIndex error with animated modal dialog.
-rw-r--r--demos/dialog/animated.html13
-rw-r--r--ui/jquery.ui.dialog.js14
2 files changed, 12 insertions, 15 deletions
diff --git a/demos/dialog/animated.html b/demos/dialog/animated.html
index 8a27150de..808d0e926 100644
--- a/demos/dialog/animated.html
+++ b/demos/dialog/animated.html
@@ -18,18 +18,21 @@
<script src="../../ui/jquery.ui.effect-explode.js"></script>
<link rel="stylesheet" href="../demos.css">
<script>
- // increase the default animation speed to exaggerate the effect
- $.fx.speeds._default = 1000;
$(function() {
$( "#dialog" ).dialog({
autoOpen: false,
- show: "blind",
- hide: "explode"
+ show: {
+ effect: "blind",
+ duration: 1000
+ },
+ hide: {
+ effect: "explode",
+ duration: 1000
+ }
});
$( "#opener" ).click(function() {
$( "#dialog" ).dialog( "open" );
- return false;
});
});
</script>
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