From a0e3b256fbbe8c934a843926df93977b7faef605 Mon Sep 17 00:00:00 2001 From: Jared Burce Date: Thu, 29 Oct 2020 05:11:14 -0700 Subject: [PATCH] protect fragile animation-end callbacks If a second ring came in, the old callbacks would clear. If this happened after the first part of the animation (likely), the callback counter would never hit its target. --- static/main.html | 1 + 1 file changed, 1 insertion(+) diff --git a/static/main.html b/static/main.html index 967b2e2..f31fcb2 100644 --- a/static/main.html +++ b/static/main.html @@ -168,6 +168,7 @@ // Instead, we can temporarily override the animation property to 'none' then the // animation will restart when we re-inheirit from the stylesheet. let flashers = $('.flash').each((_, e) => { + if (e.style.animationPlayState === 'running') return; e.style.animation = ''; e.style.animationPlayState = 'running';