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

pushState() still occurs when returning false in pjax:error event #661

Open
nickelfault opened this issue Jan 7, 2017 · 0 comments
Open

Comments

@nickelfault
Copy link

When an ajax request fails and you return false in the pjax:error event, I don't think pushState() should still be executed. When this happens you end up with an incorrect URL in the address bar. In my case, on a failure I display an alert to the user (404 not found, etc). In this case the user ends up with an inconsistent state, they see different content than the URL should provide, and if they refresh the page they'd get a whole new set of content. I've submitted a pull request that fixes the problem for me, not sure if you'd want to merge it or not.

#660

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

1 participant