mirror of
https://github.com/jquery/jquery-ui.git
synced 2025-01-07 20:34:24 +00:00
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.
This commit is contained in:
parent
548a6ce7f9
commit
13505e5945
@ -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"
|
||||
]
|
||||
});
|
||||
|
@ -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);
|
||||
|
||||
|
2
ui/jquery.ui.dialog.js
vendored
2
ui/jquery.ui.dialog.js
vendored
@ -131,7 +131,7 @@ $.widget("ui.dialog", {
|
||||
// without detaching first, the following becomes really slow
|
||||
.detach();
|
||||
|
||||
this.uiDialog.remove();
|
||||
this.uiDialog.stop( true, true ).remove();
|
||||
|
||||
if ( this.originalTitle ) {
|
||||
this.element.attr( "title", this.originalTitle );
|
||||
|
Loading…
Reference in New Issue
Block a user