materialize icon indicating copy to clipboard operation
materialize copied to clipboard

Closing modal - after modal is closed new overlay is created

Open Voyteck opened this issue 10 years ago • 2 comments

When closing modal a new overlay is created right after closing animation is completed. This overaly has next index number at the end of id. Interesting is that it is created after the animation is finished, so it can be destroyed only by binding to the close button destroying method delayed by setTimeout() function - workaround code below:

$('...').leanModal({
   complete: setTimeout(function() { $(".lean-overlay").remove(); })
});

As per now unfortunatelly "complete" callback also works incorrectly - so the above workaround will work only after fixing that (#3503) or the setTimout() code needs to be put somewhere else.

Voyteck avatar Aug 12 '16 14:08 Voyteck

How are we doing with this? Will there be a fix to modals anytime soon?

jenwebb avatar Aug 24 '16 04:08 jenwebb

leanModal is now deprecated.

fega avatar Apr 06 '17 19:04 fega