Skip to content
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

Address inability to scroll to top one page change without janky solution #343

Closed
dayhaysoos opened this issue Mar 7, 2023 · 2 comments
Closed

Comments

@dayhaysoos
Copy link
Contributor

Context

When navigating to other pages on the docs site, the site wouldn't scroll to the top on page load. This should be working by default without any weird solution. However, this was addressed by making a scrollToTop component in Docusaurus' <Layout /> component.

The commit where this solution was put into place is here: 8432f9a

Note

If you remove this code, you'll notice it stops scrolling to the top on page load. To take things even further, by running window.scrollTo(0,0) inside dev tools, you'll notice it doesn't scroll to the top even though you are explicitly running a function that would do that on any website.

Not sure what this could mean, but documenting this just in case we come across any weird, related DOM issues.

@ALRubinger
Copy link
Contributor

ALRubinger commented Mar 14, 2023

Moving off developer.tbd.website Project Board for Phase 2.

@dayhaysoos
Copy link
Contributor Author

Closing bc Kirah fixed this (ty kirah)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants