Closed Bug 1201090 Opened 9 years ago Closed 9 years ago

Clicking on Web Notifications spawned by serviceWorker doesn't open specified tab

Categories

(Firefox :: Site Permissions, defect)

42 Branch
defect
Not set
major

Tracking

()

RESOLVED DUPLICATE of bug 1130687

People

(Reporter: wmaggs, Assigned: dougt)

References

Details

Reproduce: Currently in FF 42 and 43, with Push Messages turned on, the push message only brings the focus to the page that sent the message if the tab is open. If the user closes the tab, they are stuck with a message that won't take them anywhere. This is confusing for the user. In Chrome, clicking on the message after the sending page is closed reopens the page. To reproduce: 0. set System preference on Notifications for FF to Alerts (won't disappear after a few seconds) 1. send push notification message to FF (can use johnme-gcm.appspot.com as a sample app) 2. Close tab with johnme app 3. If another tab is open, clicking on message brings up last foregrounded tab. On OSx if there is no tab open, the message is not clickable. On Windows if there is no tab open, clicking the message brings you to about: home or the new tab page. Expected behavior: receiving a Push Message allows the user to click on the message and get back to the page that the user has given permission to send messages. For example, doing the above steps in Chrome reopens the tab that the message connects to.
The service worker uses `clients.openWindow()` to open the tab (https://johnme-gcm.appspot.com/chat/sw.js), which I don't think we support yet? https://dxr.mozilla.org/mozilla-central/source/dom/workers/ServiceWorkerClients.cpp?offset=0#278-289
Assignee: nobody → dougt
Depends on: 1201571
Summary: Push Notifications don't open closed tab → Web Notifications don't open closed tab
:kit looks like openWindow() has been worked on, looks like there's more to do: https://bugzilla.mozilla.org/show_bug.cgi?id=1130687
Depends on: 1130687
Summary: Web Notifications don't open closed tab → Clicking on Web Notifications spawned by serviceWorker doesn't open specified tab
Bill and Rory: here's something that isn't currently on our SW-v1 radar.
overholt, can you find an owner for this?
Flags: needinfo?(overholt)
Sorry, forgot to update here. I emailed some people but we're trying to land Service Worker network interception in 43 and this would take away from that. Is this critical to land in 43/42 (Aurora/Beta)?
Flags: needinfo?(overholt)
Yeah, Andrew. Without this, displaying an UI from a push notification doesn't work. :?
Flags: needinfo?(overholt)
This needs work from someone who knows the window/PContent/PBrowser/e10s stuff, especially if we are going to ship this with e10s enabled. For non-e10s it *may* be easier. I tried taking a stab at this (patches in Bug 1130687) but no dice. The fact that any of our window opener code relies on there being an existing window around (based on the premise that such calls come from window.open() or similar) complicates everything when service workers are involved (where there may not be a window present). Based on this, I don't feel confident in assigning this to anyone not familiar with that code.
Status: NEW → RESOLVED
Closed: 9 years ago
No longer depends on: 1130687
Resolution: --- → DUPLICATE
No longer blocks: WADI
Flags: needinfo?(overholt)
Blocks: 1201571
No longer depends on: 1201571
You need to log in before you can comment on or make changes to this bug.