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.
This commit is contained in:
2020-10-29 05:11:14 -07:00
parent 5f60cd2a1b
commit a0e3b256fb

View File

@@ -168,6 +168,7 @@
// Instead, we can temporarily override the animation property to 'none' then the // Instead, we can temporarily override the animation property to 'none' then the
// animation will restart when we re-inheirit from the stylesheet. // animation will restart when we re-inheirit from the stylesheet.
let flashers = $('.flash').each((_, e) => { let flashers = $('.flash').each((_, e) => {
if (e.style.animationPlayState === 'running') return;
e.style.animation = ''; e.style.animation = '';
e.style.animationPlayState = 'running'; e.style.animationPlayState = 'running';