onanimationend and onanimationstart fired before the time and twice!
perymimon opened this issue · 0 comments
perymimon commented
Does this work in other browsers? No - I can reproduce the problem in another browser just test it on firefox and it reproduce
Steps to reproduce the problem:
- create a list of 2 general div HTML elements with some CSS animation on
animation-play-state: paused
or pause with devtool and attach some log to there above mention events - prepend another element div HTML elements
test working case are here: https://codesandbox.io/s/onanimationend-vanilla-8zeu1y?file=/index.html
Problem Description:
when element X prepend before an element Y with animation (paused), it triggers "onanimationend" on element Y. after the animation on Y real finish "onanimationend" trigger again
test working case are here: https://codesandbox.io/s/onanimationend-vanilla-8zeu1y?file=/index.html