Closed Bug 1854589 Opened 2 years ago Closed 17 days ago

Notification Click event is not fired when Notification is created in a Shared Worker

Categories

(Core :: DOM: Notifications, defect)

Firefox 117
defect

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: robertdejager, Unassigned)

References

Details

(Whiteboard: dom-lws-bugdash-triage)

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/117.0

Steps to reproduce:

  • Created a Shared Worker
  • Created a Notification from the Shared Worker
  • Added event handlers to the Notification:
    • Click
    • Close
  • Ran the script, showing the notification
  • Clicked on the notification

I attached a simple reproduction scenario for you :)

Actual results:

Only the Click event fires

Expected results:

Both the Click and Close events should have fired

Some information about my system:

OS: Archlinux
Linux kernel: 6.5.3
Wayland: 1.22.0
Desktop: KDE Plasma 5.27.8

The Bugbug bot thinks this bug should belong to the 'Toolkit::Alerts Service' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Alerts Service
Product: Firefox → Toolkit
Duplicate of this bug: 1854588

Well done, Bugbug (I think :)).

I have confirmed that this bug il also reproducible on Windows, using the included example.

OS: Unspecified → All
Hardware: Unspecified → All

The severity field is not set for this bug.
:nalexander, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(nalexander)
Severity: -- → S3
Component: Alerts Service → DOM: Notifications
Product: Toolkit → Core
Flags: needinfo?(nalexander)

I somehow can't reproduce the issue; I get the log whenever I click the notification.

Just to confirm this is shared worker specific: Can you get the "Notification #1 clicked" message when you trigger and click the notification in https://www.bennish.net/web-notifications.html ?

Flags: needinfo?(robertdejager)

Hello Kagami,

Thanks for taking the time to investigate this.
I can confirm that this issue only occurs when creating the notification from a shared worker.
When launched from a "regular" script, it works fine, like in your Sexy Ben example.

I have not tried to create it from a service worker, or a non-shared web worker.

You should be able to reproduce by putting the example I attached to this bug on your web server and running it from there.

Have a nice weekend.

Flags: needinfo?(robertdejager)
Component: DOM: Push Subscriptions → DOM: Notifications

After 2 years I still cannot reproduce this with your example, do you still see the issue?

Flags: needinfo?(robertdejager)
Whiteboard: dom-lws-bugdash-triage

To be honest, the project where I was implementing this was put on hold and I forgot.
I just tried my own reproduction scenario, and I can't reproduce anymore either.
Maybe it was fixed by something unrelated sometime during the past 2 years.
As far as I'm concerned we can close this.

Thanks for the wake up call :)

Flags: needinfo?(robertdejager)

And thank you for the quick reply! 👍🏻 Happy to close this.

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

Attachment

General

Creator:
Created:
Updated:
Size: