43.62 KB, application/zip
Created attachment 805649 [details] profile/webapps/double-notify/application.zip that demonstrates the issue Steps to reproduce: * Set a navigator.mozSetMessageHandler('notification', ...) listener. * Trigger a `new Notification()` and make sure the app is closed before clicking on the notification. Expected results: * The mozSetMessageHandler listener is called once per notification Actual: * The mozSetMessageHandler listener is called twice. Attaching a sample app that exhibits the behavior. Occurs with latest Gaia master and Gecko moz-central. From git log: Gaia: c6b4cc05b2de6884a652c1c5ab8401216ffa46c1 Gecko: 78b3dbc50a8cddea792b6c2870c0bfbe3726335c
Sounds like a cut and dry blocker to me.
blocking-b2g: --- → koi?
Gonna guess this is somehow my fault. Taking.
Assignee: nobody → kyle
Ok, so, we are sending it twice, because two events are happening: desktop-notification-click, and desktop-notification-closed. As I'm reading it, you should check the "clicked" property of the system message, which will only be true if the desktop-notification-click event is being sent. Otherwise, don't do anything. Does this sounds ok?
Right, sorry for the noise. I keep not expecting that behavior, but I believe that follows from how the notification spec is written. I have added to a thread on dev-gaia to discuss some smaller things like this, but closing this bug as it is working as designed, follows from a reasonable interpretation of the current spec.
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.