I am using the ServiceWorker Notification API in Android Chrome to show notifications with actions
.
I am using notifications with tag
and silent: true
, but that should not matter.
The notificationclick
handler finds a WindowClient
and calls focus()
on it. I am NOT closing the notification in the handler.
That all works as intended, but I am not happy with the behaviour of the notification tray.
When I click on the body of my notification, the notification tray closes itself, but when I click on any of the notification actions, the action itself is performed but the notification tray stays open. Which means even though the browser is now "in focus", it is still behind the notification tray, which I have to close manually by swiping.
Closing the notification in handler makes no difference (notif closes, tray stays open).
I doubt, that the Chrome API would let me solve this, but maybe someone has a solution. Thanks