diff options
author | Jörn Zaefferer <joern.zaefferer@gmail.com> | 2012-11-30 13:08:56 +0100 |
---|---|---|
committer | Jörn Zaefferer <joern.zaefferer@gmail.com> | 2012-11-30 13:08:56 +0100 |
commit | 13505e5945e5532c3d56424d50ad109c665d205f (patch) | |
tree | 0688bcd8c187f98b099717c1723afe49a4aa1325 /tests | |
parent | 548a6ce7f927f327e7db261d343caba9b889409d (diff) | |
download | jquery-ui-13505e5945e5532c3d56424d50ad109c665d205f.tar.gz jquery-ui-13505e5945e5532c3d56424d50ad109c665d205f.zip |
Dialog: Ensure all animations finish and clean up themselve when destroying dialog. Fixes #5860 - Dialog: Destroying a dialog during animated close leaves .ui-effects-wrapper in DOM.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/unit/dialog/dialog.html | 2 | ||||
-rw-r--r-- | tests/unit/dialog/dialog_options.js | 9 |
2 files changed, 11 insertions, 0 deletions
diff --git a/tests/unit/dialog/dialog.html b/tests/unit/dialog/dialog.html index 5413e7cc1..cdc846478 100644 --- a/tests/unit/dialog/dialog.html +++ b/tests/unit/dialog/dialog.html @@ -23,6 +23,8 @@ "ui/jquery.ui.draggable.js", "ui/jquery.ui.resizable.js", "ui/jquery.ui.button.js", + "ui/jquery.ui.effect.js", + "ui/jquery.ui.effect-clip.js", "ui/jquery.ui.dialog.js" ] }); diff --git a/tests/unit/dialog/dialog_options.js b/tests/unit/dialog/dialog_options.js index f01a1a2a8..fd7d91827 100644 --- a/tests/unit/dialog/dialog_options.js +++ b/tests/unit/dialog/dialog_options.js @@ -212,6 +212,15 @@ test("height", function() { el.remove(); }); +asyncTest( "hide, #5860 - don't leave effects wrapper behind", function() { + expect( 1 ); + $( "#dialog1" ).dialog({ hide: "clip" }).dialog( "close" ).dialog( "destroy" ); + setTimeout(function() { + equal( $( ".ui-effects-wrapper" ).length, 0 ); + start(); + }, 500); +}); + test("maxHeight", function() { expect(3); |