Open bluekeyboards opened 8 months ago
Thanks for the report.
Yes, this is a known issue. The main problem is that Firefox for Android doesn't implement any part of the windows API for browser extensions (despite requests from some extension developers). One workaround I've experimented with is to use a content script to track the blur/focus events for a document's window object (as in the test page linked above, which works on Android). But the problem with that solution is that currently Firefox for Android doesn't correctly implement content scripts (see here). So unfortunately I'm kinda stuck with the problem for now. 🙁
Using Firefox Android 123.1.0 and LeechBlock NG 1.6.3. When I'm viewing a tab with an active countdown timer, if my phone's screen turns off, the timer will continue running as if the tab was focused. This happens both when I manually turn my screen off (by pressing the physical button) and when it turns off automatically after a period of inactivity. The same thing happens when I go back to my home screen or switch to other apps while I'm on that tab.
The option "Treat browser window as always active" has always been off, toggling "Count time spent on these sites only when browser tab is active" on/off doesn't seem to make a difference, neither does "Process only active tabs". I have never used the override mode.
The timer does stop properly when I switch tabs or when I close Firefox (from the Recent Apps view) and restart it. I found a relatively similar issue #122 and used the website you linked, https://www.proginosko.com/test/WindowFocusEvents.html, and my browser correctly triggers BLUR events when the screen is turned off and when I switch tabs/apps.
EDIT: Just to cover all my bases, I tried Firefox Beta. No difference.