Closed istvanvasil closed 6 years ago
Edit:
Setting scroll restoration to manual eliminates this bug.
if (typeof window !== 'undefined' && window.history.scrollRestoration) {
window.history.scrollRestoration = 'manual'
}
Then manually handling page restoration.
Wondering if this is a known Safari issue or a Choo bug? @yoshuawuyts @tornqvist
FWIW I have heard of this problem before so you're not the only one, but I have no clue what causes it and whether choo is responsible, unfortunately :(
Thanks @goto-bus-stop I managed to solve this for my project with the above described solution. Hope this can be helpful for others who land here.
Taking manual control over scroll restoration creates a 100% accurate popState
navigation vs. the sometimes jumpy auto one. So, besides eliminating this issue, that's another upside of it.
A strange behaviour I have observed in Safari when navigating back to a view using swipe on the trackpad on my Macbook pro. The page freezes for a few seconds before I can interact with it again.
Observed similar behaviour on other choo sites too. Since I don't want to make my project public just yet I illustrate the behaviour with an example:
Here is a video showing the behaviour: choo freeze
My page structure is simple. It's a website for a photographer with a series of right and left floated thumbnails that take you to a project page. It happens with thumbnails lowest on the page only. Not with the ones on the top. Although they are identical in every sense. They take you to the same view and load same type of content.
Did anyone observe this behaviour before?
I hope you don't mind @jondashkyle that I used your site as an example. Maybe you have an idea about this?
Thank you!