Chrome animations added with elem.animate() behave differently when tab is not visible

So I was having issues with (infinite) animation performance and was able to track down that problems arise when I add animations to an element while the tab is not visible.

I made a pen which sadly doesn't reproduce my exact problem but it shows that apparently Chrome handles animations differently depending on the visibility of the tab at the time. (Notice the slight "border" on left/right of the second element):

https://codepen.io/konnextv/pen/abmbRLJ

https://preview.redd.it/c3w58phpyr161.png?width=330&format=png&auto=webp&s=cb95847a049c27c7f793e30e76f5cb78fc830bbf

Does anyone know if this is to be expected or possibly a bug? This does not happen in Firefox.

submitted by /u/konnextv
[comments]



Source link

Write A Comment