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

The scroll bar will move to the top every time the sidebar is clicked #8998

Closed
tyj-321 opened this issue Aug 2, 2024 · 2 comments
Closed

Comments

@tyj-321
Copy link

tyj-321 commented Aug 2, 2024

📝 Issue Description

in the sidebar, when I click on a lower menu, the scroll bar will move to the top, so I need to scroll down again

PixPin_2024-08-02_19-32-36

📋 On which page(s) it occurs

https://docs.astro.build/en/guides/styling/
and other lower menus

🤔 Expected Behavior

when I click the menu, the scroll bar will not move to the top

👀 Current Behavior

when I click the menu, the scroll bar will move to the top

🖥️ Browser

chrome 127.0.6533.72

📄 Additional Information

No response

@tyj-321 tyj-321 added the bug Something on the site isn't working label Aug 2, 2024
@sarah11918 sarah11918 removed the bug Something on the site isn't working label Aug 5, 2024
@sarah11918
Copy link
Member

Hi @tyj-321 ! This is normal behaviour for multi-page sites, unfortunately! 😄 You can see it in other docs sites that are not JavaScript apps, too.

It's not a bug, though we have been discussing whether this is something we can and should change in Starlight. There are some annoying edge cases to figure out, and we were surprised it's really not as easy to ensure that this is good behaviour for everyone in all the different ways people are using their sidebars (collapsed or not, scrolled or not, on a page that doesn't even have a sidebar entry or not...)

So I'm going to close this because it's not a bug! We're just deciding on the behaviour we want. You can view the open draft PR we've been working on (and finding out just how difficult it is to find a sensible solution) and participate in the Starlight Discussion there!

@tyj-321
Copy link
Author

tyj-321 commented Aug 6, 2024

Hi @tyj-321 ! This is normal behaviour for multi-page sites, unfortunately! 😄 You can see it in other docs sites that are not JavaScript apps, too.

It's not a bug, though we have been discussing whether this is something we can and should change in Starlight. There are some annoying edge cases to figure out, and we were surprised it's really not as easy to ensure that this is good behaviour for everyone in all the different ways people are using their sidebars (collapsed or not, scrolled or not, on a page that doesn't even have a sidebar entry or not...)

So I'm going to close this because it's not a bug! We're just deciding on the behaviour we want. You can view the open draft PR we've been working on (and finding out just how difficult it is to find a sensible solution) and participate in the Starlight Discussion there!

I understand. Thank you for your patient answer ❤

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