-
Notifications
You must be signed in to change notification settings - Fork 28
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
Adding more events, preventing unload on condition #42
Comments
Probably you should call event.preventDefault(). |
Tried it put it did not work as expected. |
I don't provide such events. You have to call that method to disable events in capture phase. This pjax ignores disabled events. I designed event canceling in this way. |
However, anyway there is no way to prevent browser back/forward without handling beforeunload events. And since pjax usually disables browser functions to keep form data, I don't use pjax with form pages and I recommend that pjax users do so. |
Have you considered adding more events to the list (as in defunkt/jquery-pjax)?
Is there a way to prevent request in case some conditions not met? For instance a dirty form not saved.
The text was updated successfully, but these errors were encountered: