ingram-projects/animxyz

onanimationend and onanimationstart fired before the time and twice!

perymimon opened this issue · 0 comments

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:

  1. 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
  2. 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