googlearchive / core-overlay

A custom element that renders on top of other content.
6 stars 20 forks source link

Protect against infinite recursion in focusOverlay #3

Closed nevir closed 10 years ago

nevir commented 10 years ago

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:

The call to async lets the overlays stack resolve before showing the next one.

nevir commented 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.

nevir commented 10 years ago

Sorry about the flapping on this issue; but here's a more resilient fix:

jlg7 commented 10 years ago

+1 - Stumbled onto same problem this afternoon when trying to use paper-toast and core-overlay in conjunction. thanks @nevir

sorvell commented 10 years ago

LGTM