Home > Mobile >  Why doesn't rails turbo-stream-from update the dom outside the tab?
Why doesn't rails turbo-stream-from update the dom outside the tab?

Time:05-27

Why doesn't rails turbo-stream-from update the dom when we're not in the application tab in the browser?

When we go back to the tab in the browser where the application is, all items are inserted at once at this point.

CodePudding user response:

I don't know the logic exactly but I think there are 2 possibilities:

  1. it uses Browser Window focus event, so the update will be done when the user has opened the tab
  2. it's a limitation from the browser, to prevent unnecessary CPU usage, it doesn't want to update the content if user is focusing on another tab
  • Related