-
-
Notifications
You must be signed in to change notification settings - Fork 124
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
Second click refreshes the page #14
Comments
It's not a bug, it's a feature. As a user I expect an action if I click on a link I'm already on. I didnt want to do nothing or just reload the content cause of my website effect (slide on smae content doesnt make sense). Any idea on how to handle that special click ? Simple content refresh ? Current behavior ? Specific callback ? |
Thanks for your answer. In some cases, this behavior can entirely break the user experience. Let's take an example. I have a video/audio player that must continuously play a movie/audio while the user is browsing the site. If the user clicks multiple times on a link, the page is reloaded and so kills the player. That would be cool to let developers handling this special click. I (personally) would just go for a simple content refresh (because that's the behavior we expect of PJAX — no full page reload). |
Hi MoOx. I'm currently developing a website for a web tv. One of the main needs is to display a player, and never "break" it during the user navigation, that's why I looked for a pjax library, and yours is the best I found :) I understand the second click on a same link is handled as a special case, so maybe the best way to do this would be to create an option, allowing to decide which one of the behaviors is triggered? That would be a choice between the three you propose: simple content refresh, current behavior, or custom via a callback, default being current one. Or maybe all three can be handled via a callback? I'm not sure. |
Maybe we can just drop this behavior for now. This should not be the default behavior by default indeed. Maybe an opion but later :) I'm on vacation for 15days so you should patch this for now. Pr are welcome but I wont be able to publish a release until 15 sept. |
I disabled the current behavior and added a new option |
Fix issue #14 (click on current url don't make a full reload anymore).
Hi MoOx! If I click on a link twice... The page is refreshed.
Reproductible on your own site :)
Any idea?
The text was updated successfully, but these errors were encountered: