79259438

Date: 2024-12-06 21:33:36
Score: 0.5
Natty:
Report link

This looks very similar to the problem I encountered a few days ago. However, surprisingly, it was actually not a bug, but a feature. This is the devtools feature, that called "Emulate a focused page", and while it is active the page does not lose focus and, as a result, does not receive the expected events. To be clear, It is very useful for some situation, but has some caveats clearly noted:

Caution: With this option turned on, the document.visibilityState is set to visible and the visibilitychange event doesn't fire. For more information, see Page Visibility API.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: Kyr