OneSignal-Website-SDK icon indicating copy to clipboard operation
OneSignal-Website-SDK copied to clipboard

[Question]: Does Click behaviour handle hash routing?

Open rhurlbatt opened this issue 2 years ago • 1 comments

How can we help?

I have a web app that is saved to the homescreen of an Android and ios device. The click url is set to a url with a hash (https://app.example.com/#section1). I have set the click behaviour to be "Origin Navigate".

The problem is that the navigation doesn't seem to work. Is this be cause of hash routing?

How do I get the notification and browser to recognise that the notification url https://app.example.com/#section1 is not equal to https://app.example.com/#listing4 and navigate accordingly (without forcing it to reload the page)?

rhurlbatt avatar Jun 29 '23 16:06 rhurlbatt

@rhurlbatt I don't believe the Web SDK currently supports navigating to a hash / anchor currently. We will mark this as a feature request.

In the meantime you can setup the OneSignal notification click listener to handle this with your own code however.

jkasten2 avatar Aug 16 '23 01:08 jkasten2