Throttling prevents wakeup event when rapidly switching tabs
Closed this issue · 2 comments
Basvg commented
Hi,
Thanks for forking and maintaining this library!
I have discovered an issue when rapidly switching to a different tab and back again. In this case the wakeup event is not fired. This is caused by the throttling of events. Lowering the throttle duration does not seem to help, at least during my testing. The timeout callback takes at least 100ms to fire, even with a duration of 1ms.
I was wondering whether the visibility change event actually needs throttling? It will never be fired as often as the other events.
rosskevin commented
I was wondering whether the visibility change event actually needs throttling? It will never be fired as often as the other events.
You are right, it probably doesn't need throttling. PR's are welcome!