page-lifecycle
page-lifecycle copied to clipboard
beforeunload not working in iOS browsers
I am trying to display the "Are you sure you want to leave" prompt using the beforeunload event. However, it does not work in iOS, neither in Safari nor in Chrome. I am using the addUnsavedChanges method. Am I missing something?
Might not be a good idea to use this library since this library is not being actively managed to keep in sync with browsers updates
Hi @tonystaark,
Maybe you can tell me how to correctly catch the events of closing the browser tab on IOS 14?
Thanks
@philipwalton some updates?
As far as I know, Safari on iOS (which includes the WebView used by Chrome) does not fire the beforeunload event. In other words, this is not something this library can prevent.
@philipwalton thank you