#possible to cancel back button with solid router?
13 messages · Page 1 of 1 (latest)
well, then, you probably have to play with window.beforeunload
Apparently it doesn't get fire on mobile https://developer.chrome.com/articles/page-lifecycle-api/#the-beforeunload-event
I've actually seen some site triggering an alert when swiping back though
What was the code exactly?
For beforeunload
To my experience, it only seems to work with window.beforeunload =
Not with addEventListener
Making the browser pop up an alert on user trying to navigate away
Yeah, but I doubt browser will respect the message supplied
No idea then
can’t you disable the default swipe behavior?
https://developer.mozilla.org/en-US/docs/Web/CSS/overscroll-behavior does this something?