-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Improve tab scroll on click #7531
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
|
I've encountered this problem and this behavior make me very distressed. I wanted to file an issue but I forgot. |
To comment on the Starlight part of things:
|
I think since upstream support may take a while to iron out, it might be worth to push this along first? The auto-scroll prevention would improve the experience at the meantime. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, I'm happy with adding this for now. Once upstream support is released, we can update this to use the new implementation.
Description (required)
At https://docs.astro.build/en/install/auto/#1-run-the-setup-wizard, when clicking a package manager tab, it auto scrolls to the tab and I lost focus of where I am 😅 This PR replaces the auto-scroll with a logic that maintains the scroll position when clicking on a tab.
A more complex example where the scroll position can shift is at https://docs.astro.build/en/recipes/sharing-state-islands/#using-atoms. With this PR, the tab I clicked will also maintain its position.
(I think it's best to showcase a video of how it works, but I haven't figured how to do that on my laptop without large file sizes)
Related issues & labels (optional)