Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chrome now fires extra popstate event on back, causing confirmLeave prompt to show twice #367

Open
Brikky opened this issue Aug 20, 2019 · 1 comment

Comments

@Brikky
Copy link

Brikky commented Aug 20, 2019

Chrome browsers are bubbling up multiple popstate events, which causes the confirmLeave prompt box to show display twice when using the back/forward buttons.

The first time it's shown the dialog is passed an object with the page's location information, so the message is [Object object], the second dialog is the correct one generated by confirmLeave

This issue is caused because the DOMUtils don't anticipate this extra event in Chrome except on iOS. Changing this function to return true when the event state is undefined resolved this issue.

@ScriptedAlchemy
Copy link
Collaborator

Ill welcome a PR

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

No branches or pull requests

2 participants