Bug 247978 - notificationclose event not firing when notification cleared
Summary: notificationclose event not firing when notification cleared
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Service Workers (show other bugs)
Version: Safari 16
Hardware: Mac (Intel) macOS 13
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-11-16 07:45 PST by Andy
Modified: 2024-02-06 10:55 PST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andy 2022-11-16 07:45:17 PST
the event 'notificationclose' does not fire when user closes a web push notification from notification center


To replicate:
- add the code below to service worker
- push a notification
- use web inspector on the service worker, with breakpoints for debugger enabled
- click the X for the notification

self.addEventListener('notificationclose', function (event) {
debugger;
})

expected outcome:
Safari Web Inspector pauses at the debugger line above

Actual outcome:
The event is never triggered
Comment 1 Radar WebKit Bug Importer 2022-11-16 22:13:55 PST
<rdar://problem/102451723>
Comment 2 youenn fablet 2022-11-18 08:18:45 PST
I am adding an API test at https://bugs.webkit.org/show_bug.cgi?id=248084.
The test seems to be working so maybe the issue is at Safari level.