You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Example: a form that the user fills in. Then they attempt to navigate away from the page. How can we hook the "onbeforeunload" action and prevent page transition unless user approves loss of changes? window.onbeforeunload doesn't seem to fire in these page transitions.
The text was updated successfully, but these errors were encountered:
I'm facing an issue for which I tried to solve with the window.onbeforeunload event, but without success. So basically I have two simple pages that I can navigate to, and the page.js adds to the URL a path based on the current page, in my case, it is the /about page. Now, whenever I hit the refresh button, the action is recognised as an HTTP request leading to page not found. That's why I am trying to intercept this HTTP call with window.onbeforeunload event, which seems not to work.
I've searched for open issues, and I found the following question: #373 . This question doesn't help me in my case but might help you.
Example: a form that the user fills in. Then they attempt to navigate away from the page. How can we hook the "onbeforeunload" action and prevent page transition unless user approves loss of changes? window.onbeforeunload doesn't seem to fire in these page transitions.
The text was updated successfully, but these errors were encountered: