I think I have found a bug. TurboStreams & Browser tabs

Hi I would like to discuss this github issue:

we are in the process of rewriting our chat application to hotwire and we have found that the dom modifications on Turbo are kind of queued when the browser tab is not active. Hotwire authors claims that this is a browser limitation, but we currently have the implementation on react and works ok. we have figured out this because new messages makes a sound. but with the hotwire version user must actually see the browser tab to receive the messages. it seems that this is a bug.


React version:


Hotwire version


more context: Replace call to requestAnimationFrame in render function to update page content even if tab has lost focus · Issue #920 · hotwired/turbo · GitHub

I did a poc in which I have replaced all the nextAnimationFrame by nextMicroTask and it works!

this was fixed on main.