Found the issue, an older attempt to manually restore the scroll position was still firing. Everything works as it’s should. Thanks for the help
j0hSCh
Posts
-
Scroll position restoration not working as expected. -
Scroll position restoration not working as expected.Hey hey,
thanks for the update. I've installed the patch and the problem seems mostly solved.
When using the site’s or the browser’s back button, navigation works as expected, the browsers returns to the previous scroll position. When clicking the home link (top left) however, the frontpage loads at some random scroll position. The same happens when reloading the frontpage.
Here’s a video showing the issue: https://drive.google.com/file/d/1eioLdKKg6C9ii18iHyPFCfZbj-DvnFi7/view?usp=sharing
I've tried disabling all custom code, clearing the cache, etc.
-
Scroll position restoration not working as expected.Any ideas?
-
Scroll position restoration not working as expected.Thanks for the quick reply. Here's the URL: http://patrick-desbrosses.com/
-
Scroll position restoration not working as expected.We're having difficulties with a Lay Theme installation: After navigating between pages (frontpage → project page and back), the restoration of the previous scroll position does not work as expected. Rather than returning to the position previously scrolled to, the page jumps to some arbitrary position (the same position every time).
There is some custom frontend JavaScript running, but nothing concerning the scroll behavior. Disabling all custom code does not effect the problem, so I'm assuming this is not the problem.
I've tried setting up custom handling for scroll position restoration but whatever the Lay Theme frontend code does in regards to this seems to be overriding it.
How is Lay Theme handling scroll position restoration and what might cause this behavior?
Any help with solving this would be great, navigating the site with this issue is very suboptimal.
Thanks.