Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question]: Can't get Notification click event #1127

Closed
fearistoff opened this issue Nov 13, 2023 · 5 comments
Closed

[Question]: Can't get Notification click event #1127

fearistoff opened this issue Nov 13, 2023 · 5 comments

Comments

@fearistoff
Copy link

fearistoff commented Nov 13, 2023

I have successfully subscribed and receiving Notifications. But when in click any of them, after focusing tab with same origin (Matching Strategy: Origin, Action Strategy: Navigate) nothing happens.

I've also added Notification handler oneSignal.Notifications.addEventListener, but event not triggering, despite the fact that a message in the Service Worker about a click on the Notification appears in the console.

@fearistoff fearistoff changed the title [Question]: Can't get Notification click event in Web [Question]: Can't get Notification click event Nov 13, 2023
@fearistoff
Copy link
Author

I'm using npm-package for vue @onesignal/[email protected]. And OneSignalSDK.sw.js version 16 from documentation.

@jkasten2
Copy link
Member

jkasten2 commented Nov 14, 2023

@fearistoff Thanks for reporting these issues.

I have successfully subscribed and receiving Notifications. But when in click any of them, after focusing tab with same origin (Matching Strategy: Origin, Action Strategy: Navigate) nothing happens.

I attempted to reproduce this issue on Chrome 119 on Windows 11 and have not been able to reproduce this issue. I have tested with a custom luachURL and with default. Can you share more details?

I've also added Notification handler oneSignal.Notifications.addEventListener, but event not triggering, despite the fact that a message in the Service Worker about a click on the Notification appears in the console.

There is an SDK if the notification click results in opening a new tab this was not firing on the new tab. We are addressing this bug in PR #1132 and will be shipped soon was released version 160004 on 2023-11-14.

@jkasten2
Copy link
Member

@fearistoff The OneSignal.Notifications.addEventListener('click', function() {}) issue has now been fixed and release.

Please provide more information on the first part of your issue noted above.

@fearistoff
Copy link
Author

fearistoff commented Nov 15, 2023

I attempted to reproduce this issue on Chrome 119 on Windows 11 and have not been able to reproduce this issue. I have tested with a custom luachURL and with default. Can you share more details?

For some reason it works now. Maybe I should resubscribe to apply settings changes in web-client. But after focus tab navigation in it are happening with some random delay (up to one second), but that is okay.

I think that question we can close.

@jkasten2
Copy link
Member

@fearistoff good to hear things are working for you now! I'll mark this issue as resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants