-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
Setting CSS: overflow results in scroll not being reset on link navigation #26762
Comments
Hmm, I did some further digging and it seems like this CSS:
creates scrollTo problems even outside of Gatsby: I managed to fix this by changing the CSS to Apologies for the non-issue, but I based on what I've seen there has been a decent amount of confusion about this, so I'll leave it open for a while longer in case anyone wants to comment or clarify anything. |
I'll close the issue as you discovered it doesn't seem strictly Gatsby related. It doesn't mean discussion should stop here, just that we need open issues to be actionable. We can still comment on close issue and issue will still be still searchable/discoverable. I personally don't know inner working of browser in this area and how to explain why |
Description
When the CSS
overflow: auto; height: 100%
is applied to the html and body tags, it results in navigation via to not reset scroll position to the top. This has been raised before in other issues, for example in issue #7454 where several comments have mentioned the overflow problem.Steps to reproduce
You can recreate this from gatsby-default-starter:
Demo:
https://github.com/benjmo/gatsby-scroll-bug-demo
Expected result
Scroll is reset to top of page.
Actual result
Scroll position is unchanged.
Environment
The text was updated successfully, but these errors were encountered: