question

53203148 avatar image
0 Votes"
53203148 asked Deepak-MSFT commented

Click events for push notifications don't work as expected in Edge on Windows 10

Using a service worker, the screen transition is performed by the click event of the push notification with the following code.
Screen transition is possible in Chrome on Mac, but screen transition is not possible in Edge And Chrome on Windows 10.
Is there any solution?

importScripts('./ngsw-worker.js');

self.addEventListener('notificationclick', (event) => {
    event.waitUntil(
        self.clients.matchAll().then(function(clientList) {
            focusWindow(event);
            if (clientList.length > 0) {
                return clientList[0].focus();
            }
            return self.clients.openWindow('../hoge/fuga');
        })
        
    );
});

`

ms-edge
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @53203148 ,
Could you please provide the detailed steps for reproducing the issue?
Please inform us which version of the Edge browser you are using?
Does it show any error or warning messages? if yes, please inform us about it.

1 Vote 1 ·

0 Answers