@mattab opened this Issue on September 22nd 2020 Member

Heartbeat timer ping request is not always sent (focusing away from the tab should trigger the ping request). For example, can’t see a ping request when doing:

  • Open test page
  • Scroll for a bit.
  • Wait 30 seconds.
  • Click on another tab.
  • Come back to the original tab.
  • got: no ping request, but expected one in this case?

We discussed internally and a comment was: focusing another browser tab works for me as well in incognito mode. It doesn’t work though in my regular browser window either because of some extension or because there are so many tabs open or so. I’d suggest you test this in incognito as well and see if it works there. Then also make sure to close all other tabs and eg have only two tabs open and no extension. Generally the code is adding the blur event to the window and if the browser doesn’t trigger it there’s not too much we can do.

we can look to maybe additionally use the visibility API if it helps maybe:

document.addEventListener( 'visibilitychange' , function() {
if (document.hidden) {…
}, false );
Powered by GitHub Issue Mirror