Opened 13 years ago

Closed 10 years ago

#5860 closed bug (fixed)

Dialog: Destroying a dialog during animated close leaves .ui-effects-wrapper in DOM

Reported by: bgould Owned by:
Priority: minor Milestone: 1.10.0
Component: ui.dialog Version: 1.8.2
Keywords: animation Cc:
Blocked by: Blocking:

Description (last modified by Scott González)

If a dialog has the hide option set and the dialog is destroyed while it is being animated, the effects wrapper remains in the DOM.

$( "#dialog" ).dialog({ hide: "clip" }).dialog( "close" ).dialog( "destroy" );
setTimeout(function() {
    alert( $( ".ui-effects-wrapper" ).length );
}, 1000);

Attachments (1)

effects-div-screenshot.png (88.8 KB) - added by bgould 13 years ago.
screenshot illustrating problematic div location

Download all attachments as: .zip

Change History (12)

Changed 13 years ago by bgould

Attachment: effects-div-screenshot.png added

screenshot illustrating problematic div location

comment:1 Changed 13 years ago by Scott González

Resolution: worksforme
Status: newclosed

I can't reproduce this. Can you please include a reduced test case? The test case doesn't even need to have tabs on the page, it just needs to show that the effects wrapper exists after the animation completes. Showing that $( ".ui-effects-wrapper" ).length returns a value other than 0 after the animation would suffice.

comment:2 Changed 13 years ago by swalke16

Resolution: worksforme
Status: closedreopened

http://jsbin.com/iheka

Here is a simple reproduction case... Note that this problem only happens when you are using an effect on the "hide" option...

comment:3 in reply to:  2 Changed 13 years ago by Scott González

Replying to swalke16:

http://jsbin.com/iheka

Here is a simple reproduction case... Note that this problem only happens when you are using an effect on the "hide" option...

This is only happening because you're destroying the dialog before the animation completes.

comment:4 Changed 13 years ago by swalke16

ahh... cool. Using the close option to pass a callback that does the destroy works a treat! Thanks.

comment:5 Changed 13 years ago by Scott González

Component: effects.coreui.dialog
Description: modified (diff)
Milestone: TBD1.9
Summary: .ui-effects-wrapper seems to be colliding with tabsDialog: Destroying a dialog during animated close leaves .ui-effects-wrapper in DOM

comment:6 Changed 12 years ago by Scott González

Keywords: animation added

comment:7 Changed 11 years ago by Scott González

Milestone: 1.9.01.10.0

comment:8 Changed 11 years ago by fontzter

This appears to be fixed in 1.9. Although the alert in the test case ( http://jsbin.com/iheka ) still shows the element, it is removed right after that. Executing $( ".ui-effects-wrapper" ).length in the console returns 0.

comment:9 Changed 11 years ago by Scott González

Status: reopenedopen

I still see the problem in 1.9.0.

comment:10 Changed 10 years ago by Jörn Zaefferer

Still happening in master: http://jsbin.com/orozuj/1/edit

comment:11 Changed 10 years ago by Jörn Zaefferer

Resolution: fixed
Status: openclosed

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.

Changeset: 13505e5945e5532c3d56424d50ad109c665d205f

Note: See TracTickets for help on using tickets.