-
Notifications
You must be signed in to change notification settings - Fork 9
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
Implement scroll to top on page navigate #514
Conversation
Deployed to Cloudflare Pages
|
[Mobile] When accessing a dashboard it isn't scrolled to top |
My preferred UX would be: scroll to top on navigation, but keep position when refreshing and reopening tabs |
and restore position when clicking back (or forward) |
👍🏻 |
edd4199
to
c3c76b6
Compare
Implemented, ScrollRestoration did not quite cover all the cases, especially on forward and page refresh. As the case for reopening the tabs, it works as long there is an active tab open - since the scroll map is saved in sessionStorage. |
@lubej can you check if #567 (https://2010762f.oasis-explorer.pages.dev/) satisfies all requirements? I checked the basics, and seems to behave the same/better, without a custom implementation |
@lukaw3d one thing that does not work is reopening the tab, but given how much it simplifies the code, I would go with your implementation. Not sure why I was facing issues with ScrollRestoration -> forward particularly. When in your case it seems to work fine. |
No description provided.