Ticker.setTimingMode("timeout")

I'm looping through elements inside a scrambler and applying an animation to each one using wait, so that they appear one after another.

When I switch to another browser tab and then come back, the animation of the first element freezes and doesn't continue when I return to the tab.

I tried using the pauseOnBlur parameter, but it didn't help.

Only when I added this line:
Ticker.setTimingMode("timeout");
the animation no longer freezes and works as expected.

My question is:
Would it be better to listen for a blur event and switch to "timeout" only when the tab loses focus, then switch back to "requestAnimationFrame" when the tab regains focus?
Or is it okay to just leave it set to "timeout" all the time?

It might be best if we can debug any issues with animate() and wait when switching tabs. We will try and have a look this afternoon and advise further.

A simple test, seems fine with wait and going to another tab and coming back. There might be something with it working in combination with the Scrambler (which is quite complex) that causes it to break.

https://zimjs.com/018/wait.html

What does this do for you?