I am using this event, together with page Hash values to control behaviour when a user clicks the browser back/forward buttons (the pages in the application are created in a div on a main page) and this works well except for one instance.
When the user has been through the Sphinx Login process then the Sphinx url is part of the history stack. Unfortunately you don't get to preview the back button move before it's made, so my event trap in the main application doesn't see the call to the login url, which unloads the application.
I've tried to replace the state with history.replaceState but that doesn't seem to work, so as a temporary measure I add a history entry so there is a buffer between the page after login and the login history entry. Not ideal.
Tested OnPopState in the demo Demo\Basics\Routing and this event is triggered. Must be specifically in connection with something you do in your app or with Sphinx. Do you have a sample source app with which we can reproduce this?
Yes the event fires ok within the app. The problem is that Sphinx doesn't load within the app but is it's own webcore app. This processes the login and redirects back to the application.
So when you back button to the history entry for Sphinx the main application is no longer loaded so the event trap isn't there.
For lots of reasons it would be good if Sphinx could operate in the context of the main application as we have to do state saving to reset the app after the login has completed.
I'm not sure what you mean here.
As you said, Sphinx login app is another app and should be like that. You would have the same problem if you were using Auth0, Google, or whatever other 3rd party login app. It's just a redirection from another app, and I can't tell what can be done here at Sphinx side?