I've got a setup similar to the one shown in this fiddle: http://jsfiddle.net/ryan_nauman/YWLtH/. A modal window is opened with some placeholder loading text and when some async completes I re-use the existing modal, show the real content, and open/recenter.
Strangely, when animation is disabled the overlay sticks around. It's interesting that if the first modal is closed the overlay is removed. Once the second one appears after the delay, the overlay isn't removed.
I stepped through this code a bunch and am puzzled by this logic:
Anyways, this was the only strange thing I noticed. I'm not quite sure how animation plays into this bug.
Strangely, when animation is disabled the overlay sticks around. It's interesting that if the first modal is closed the overlay is removed. Once the second one appears after the delay, the overlay isn't removed.
I stepped through this code a bunch and am puzzled by this logic:
shouldHideOverlay = options.modal && !modalWindows.length;