Closed
Bug 1391076
Opened 5 years ago
Closed 4 years ago
standalone PWAs don't fire focus/blur or visibilitychanged events
Categories
(Firefox for Android Graveyard :: Web Apps (PWAs), defect)
Firefox for Android Graveyard
Web Apps (PWAs)
Tracking
(firefox60 fixed)
RESOLVED
FIXED
Firefox 60
Tracking | Status | |
---|---|---|
firefox60 | --- | fixed |
People
(Reporter: jovan.gerodetti, Assigned: droeh)
Details
Attachments
(1 file)
1.10 KB,
patch
|
snorp
:
review+
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:56.0) Gecko/20100101 Firefox/56.0 Build ID: 20170810180547 Steps to reproduce: 1. add a site to the homescreen in standalone mode 2. launch the PWA 2. switch to an other app or the homescreen Actual results: No window focus/blur or visibilitychanged events are fired when the visibility status of the activity changes. Also document.hidden is always false. Expected results: document.hidden should be set to true and the blur event as well as the visibilitychanged event should fire. The focus and visibilitychanged event should also fire when the activity moves back to the foreground.
Comment 2•5 years ago
|
||
Hi, sorry all I know is that on B2G we used mozbrowservisibilitychange events on the Browser API and some of that code was recently removed in bug 1368712. I would have thought this would be different for Android though.
Flags: needinfo?(bfrancis)
Reporter | ||
Updated•4 years ago
|
Flags: needinfo?(snorp)
We call GeckoSession.setActive() in onPause() and onResume(), which I would expect to take care of this. Dylan, can you take a look?
Flags: needinfo?(snorp) → needinfo?(droeh)
Reporter | ||
Comment 4•4 years ago
|
||
I tested this again, and it seems that it has improved already: - document.hidden is correctly set when the PWA goes into the background - visibilitychange is fired on the document and window when the PWA goes into the background or comes to the front What still doesn't work: - no focus or blur event is ever dispatched, when moving the PWA into the background or the foreground Note: the only time I got a blur event was after I killed the PWA activity.
Assignee | ||
Comment 5•4 years ago
|
||
This updates GeckoSession.setActive so that we are focusing/blurring in addition to setting the docshell active/inactive.
Assignee: nobody → droeh
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(droeh)
Attachment #8950312 -
Flags: review?(snorp)
Attachment #8950312 -
Flags: review?(snorp) → review+
Pushed by droeh@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/04ed54caac20 Update GeckoSession.setActive to focus/blur as appropriate. r=snorp
Comment 7•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/04ed54caac20
Status: NEW → RESOLVED
Closed: 4 years ago
status-firefox60:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 60
Updated•1 year ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•