Skip to content

[agent] clear agenda refetch interval on browser tab blur

Vincent Agnano requested to merge fix/alerts-after-browser-tab-blur into master

Created by: adipasquale

https://trello.com/c/Fpw2RY9R/979-agentcalendrier-lorsquun-onglet-est-laiss%C3%A9-ouvert-longtemps-il-y-a-plein-dalertes-lorsquon-revient

visibilitychange seems decently supported https://developer.mozilla.org/en-US/docs/Web/API/Document/visibilitychange_event https://caniuse.com/#search=visibilitychange

to test :

  • open a calendar page, open the network tab
  • clear network requests and switch to another tab
  • wait 1m +
  • go back to the other tab
  • check that there was no request in between BUT that requests re-start

repeat test but staying on the same tab but leaving the agenda (eg by navigating to absences with turbolinks)

Merge request reports