Closed Bug 1362964 Opened 8 years ago Closed 1 year ago

No web notification upon allow but not "remember choice"

Categories

(Firefox :: Site Permissions, defect)

53 Branch
defect

Tracking

()

RESOLVED INVALID

People

(Reporter: roger_bosman, Unassigned)

References

Details

User Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.96 Safari/537.36 Steps to reproduce: Call this code on a webpage that works in other browsers: // Let's check whether notification permissions have already been granted if (Notification.permission === "granted") { // If it's okay let's create a notification createNotification(); } // Otherwise, we need to ask the user for permission else if (Notification.permission !== "denied") { Notification.requestPermission(function (permission) { // If the user accepts, let's create a notification if (permission === "granted") { createNotification(); } }); } Actual results: Firefox prompts for permission, when clicking yes and checking "remember choice" button everything works as expected. However, when not remembering choice, permission comes back as "granted" and notification gets created, but no notification is displayed. Expected results: Notification should be displayed once if clicking allow but not checking "remember choice" checkbox.
Component: Untriaged → Notifications and Alerts
Product: Core → Toolkit
Any ideas here? Or is there a better person to ask? Thanks!
Flags: needinfo?(kit)
Note: omitted contents of createNotification(), but none of the suggested ways of https://developer.mozilla.org/en-US/docs/Web/API/Notifications_API/Using_the_Notifications_API work (constructor of Notification gets called just fine, no errors, just no display of notification)
Hmm, I didn't realize we shipped the checkbox to release. We treat web notifications (`new Notification(...)`) and push notifications (sent via service workers) the same way. Since service workers outlive a session, it didn't make sense to temporarily allow push notifications, so that's why 52 and earlier only showed "Always Receive" and "Always Block". In 53 and 54, though: * Check "remember" + Don't Allow = Always block. The site can't ask again until you remove the block using the control center. * Uncheck "remember" + Don't Allow = Blocked for now, but the site can ask again once you refresh. * Check "remember" + Allow = Both web and push notifications work. * Uncheck "remember" + Allow = This bug. It *looks* like permission is granted, and you can get a push endpoint, but neither web nor push notifications work. The checkbox is gone in 55, but I don't know what we can do for 53 and 54. Johann, WDYT? Is it too late to uplift the new doorhanger with "Not Now", "Never Allow", "Allow" to 54?
Flags: needinfo?(kit) → needinfo?(jhofmann)
See Also: → 1341742
Yup, since that patch adds new strings it's too late unfortunately. FWIW, in bug 1341742 we offered to patch up the checkbox to be essentially a no-op (always save the permission as permanent) to fix this short term, but didn't get a positive signal on it. Arguably it's not a big problem since research shows that virtual nobody notices that checkbox anyway https://medium.com/firefox-ux/user-study-new-privacy-permissions-panel-223e61cc7545
Flags: needinfo?(jhofmann)
Severity: normal → S3
Component: Notifications and Alerts → Site Permissions
Product: Toolkit → Firefox

The notification permission doorhanger doesn't have a "remember" checkbox anymore.

Status: UNCONFIRMED → RESOLVED
Closed: 1 year ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.