push.js icon indicating copy to clipboard operation
push.js copied to clipboard

Chrome Notification Center URL goes to the homepage

Open jasontestinsight opened this issue 4 years ago • 1 comments

Windows 10 Pro - 1903 - 18362.720 Chrome Version 84.0.4147.125 (Official Build) (64-bit)

The behavior with PushJs seems to vary. I've noticed 2 variances. An example of how this is set up is : assuming link = www.example.com/asd/dsa

var config = {
            body: text,
            icon: "/img/notification.png",
            link: link,
            tag: text
        };

        if (link) {
            config.onClick = function () {
                window.open(link);
                this.close();
            };
        }

  1. A notification pop-up on the right side of the screen. If I click on this pop-up, it opens to the correct/full URL.

1b) Issue is here If I leave it alone for 4 seconds, it calls onclose() by itself and it closes this pop up, BUT it adds itself to the Windows Notification Center. Clicking the notification here goes to the homepage of the URL, in this case, www.example.com, and drops everything after the /. How can I fix this ?

  1. If I trigger the same message multiple times, it goes directly to the Windows Notification Center. Clicking on this notification now goes to the correct/full url.

A temporary workaround seems to be setting requireInteraction = true, so the pop up doesn't hide itself, but closing the tab that generated the notification, then clicking on the notification would open a new tab and goes to the homepage instead of the full url.

jasontestinsight avatar Aug 15 '20 01:08 jasontestinsight

@jasontestinsight @Nickersoft I am experiencing the exact same issue. Did you ever find a way to resolve it?

exzizt avatar Apr 21 '22 19:04 exzizt