Open Bug 870721 Opened 11 years ago Updated 2 years ago

page visibility does not reflect locked screen/screen saver

Categories

(Firefox :: Shell Integration, defect)

23 Branch
x86_64
Linux
defect

Tracking

()

UNCONFIRMED

People

(Reporter: em, Unassigned)

Details

The Visibility API does not appear to mark a document as hidden when the screen is locked, or the screen saver is active. I would expect my document to become hidden at these times since, just like minimized, the user cannot view or interact with the page.

If needed, section 4.2 of the W3c Visibility API document uses a locked screen as an example of when hidden=true.
I'm running into this issue as well. I've setup a fiddle that shows the behavior in the latest firefox. Switch between tabs and the console will indicate that the window was hidden and then came back into view. However, if you start the screen saver or lock the screen you will not see the event fire off. I confirmed that the event is fired in the chrome browser. Here is a link to the demo I created: https://jsfiddle.net/johnsonw/uodysyk9/
This issue also occurs when Firefox is not the foreground window and the tab is selected.

To reproduce:
1. Open tab in window 1
2. Run in console setInterval(function(){console.log(document.hidden);}, 1000);
3. Open window 2 in foreground and leave for several seconds
4. Switch back to window 1

Expected result: console should read true while window 2 is in foreground
Observed behaviour: console always reads false
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.