Closed nevir closed 10 years ago
Ack, there's more to this - sometimes overlays aren't being removed when there's a stack (transitionend
isn't firing). I need to dig further.
Closing until I've got a better idea of what's going on.
Sorry about the flapping on this issue; but here's a more resilient fix:
core-overlay
now tracks when it's being transitioned (would that be better as state on core-transition
?)+1 - Stumbled onto same problem this afternoon when trying to use paper-toast
and core-overlay
in conjunction. thanks @nevir
LGTM
An easy way to repro the infinite recursion is to create multiple opened overlays, and dismiss them at the same time (toasts).
Here's what's happening. Say there are two overlays (A, and B), that were dismissed at the same time - and that their transitions end within the same run loop tick:
A.transitionend
:overlays
.applyFocus
, which callsfocusOverlay
.focusOverlay
callsB.applyFocus
:B.closed == false
, sofocusOverlay
is called again.The call to
async
lets theoverlays
stack resolve before showing the next one.