Homepage heading animation running in background/bugged upon reentering
Erbenos opened this issue · 1 comments
Erbenos commented
Reproduction link
https://gridsome.org/
Steps to reproduce
- Open https://gridsome.org/
- Keep https://gridsome.org/ opened, in same browser window switch to different tab
- Wait a while
- Re-enter previously opened https://gridsome.org/ tab
What is expected ?
Animation will continue playing as before
What is actually happening?
Since the animation is using setInterval only:
- it keeps running even when tab is not active
- it causes weird behaviour when reentering - as if multiple animation iterations were stacked on top of each other... only for first iteration upon reentering
Additional comments?
Checked on Chrome.