Incorrect scroll top position when navigating between pages #25745
Labels
topic: core
Relates to Gatsby's core (e.g. page loading, reporter, state machine)
type: bug
An issue or pull request relating to a bug in Gatsby
Description
After upgrading from
gatsby@2.20.26
togatsby@2.24.2
I noticed an issue where navigating within the app sets incorrect scroll top position.NOTE: I previously raised this here - #25554 and suggested fix through
Didn't fix it for me.
And as @blainekasten suggested, I'm creating a new issue as it's different to that raised by the author of #25554
Steps to reproduce
gatsby@2.24.2
gatsby develop
window.scrollY
. As long as it's more than0
then you're good.0
(again, can verify as detailed in the previous step)Expected result
After navigating to a new page user should be scrolled to the top of the page. In other words,
window.scrollY
should return0
after navigating to a new page.Actual result
If page that user navigated from had a
window.scrollY
value of 1500, the new page will also return 1500 when logging outwindow.scrollY
Environment
The text was updated successfully, but these errors were encountered: