Skip to content
This repository has been archived by the owner on Jun 28, 2024. It is now read-only.

beforeunload not working in iOS browsers #11

Open
akshatgautam opened this issue Aug 25, 2020 · 5 comments
Open

beforeunload not working in iOS browsers #11

akshatgautam opened this issue Aug 25, 2020 · 5 comments

Comments

@akshatgautam
Copy link

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?

@tonystaark
Copy link

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

@yura999999999
Copy link

yura999999999 commented Jan 28, 2021

Hi @tonystaark,

Maybe you can tell me how to correctly catch the events of closing the browser tab on IOS 14?

Thanks

@yura999999999
Copy link

@philipwalton some updates?

@philipwalton
Copy link
Contributor

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.

@yura999999999
Copy link

@philipwalton thank you

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants