-
Notifications
You must be signed in to change notification settings - Fork 435
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
Turbo history navigation may behave oddly in Safari #810
Comments
I'm not sure if we're seeing the same thing, but definitely spotted some odd behaviour with back button with Safari on iOS. It's very hard to reproduce and not on all devices either (one person from our team experiences it with iPhone 12, others don't). Back button seems to "jump" unexpectedly to the homepage even after navigating into a few "inner" pages. Downgrading turbo to v7.1 seems to solve it for this particular case. Very hand-wavey, I know, but thought I'd chime in as we're totally puzzled by this. |
We were able to reproduce it intermittently with throttling the network connection as well on Safari iOS (using Browserstack with network throttling to 3G). |
I would very much like to |
I'm pretty sure the culprit is #601 Unfortunately, that PR is solving another scroll bug, so the fix here isn't simply reverting it :/ |
Thanks for the extra context @manuelpuyol. I wasn't aware of it. I thought identifying the issue was the first step, but looks like we're already there. If there's anything I can do to help, please let me know. |
I can reproduce the same problem. |
@seanpdoyle I'd love to hear if you have any ideas about this issue. We've had multiple user tickets about it now and I can't find a good solution |
Facing the same issue since upgrading turbo to the most latest version. Back button on Safari Mac seems to not work at all |
Hi @seanpdoyle! It's been a while since this was reported. Any chance y'all look into this or should we assume this is not a priority that'll be picked up anytime soon? |
Some context in WICG/interventions#21 (comment)
Looks like Safari has an heuristic where if a script runs
history.pushState
after 500ms of the last user interaction, Safari will flag that history state as spammy and it will skip it when clicking the back button.Here's a quick repro, using Charles Proxy to throttle the network, making requests take more than 500ms:
Screen.Recording.2022-12-06.at.10.48.21.AM.mov
The only code change I made was
Notes
history.back()
works fine, so creating a test-case is hard sincepage.goBack()
uses the history API instead of actually clicking the back buttonThe text was updated successfully, but these errors were encountered: