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

Sticky navbar jolts to nav anchor on click #1586

Open
dylanh724 opened this issue Aug 8, 2024 · 1 comment
Open

Sticky navbar jolts to nav anchor on click #1586

dylanh724 opened this issue Aug 8, 2024 · 1 comment

Comments

@dylanh724
Copy link

dylanh724 commented Aug 8, 2024

Details

Expected Result

The left [sticky] navbar shouldn't move at all when a toctree navbar element is clicked for a smooth nav UX.

(OR, at with an option to turn this off, anchor jump top the top-level parent category; not to individual children)

Actual Result

Navigating to new pages "jolts" the navbar, scrolling down to align with whatever child navbar toctree element was clicked. This creates a frustrating UX experience. See this low-quality GIF (apologies, the mp4 was too big in size):

GIF

Thoughts

What I believe is happening is that click jumps to the body's selected header -- intended and good. However, if it's a sticky navbar, the navbar is separately jumping to its own anchor (not intended -- or if intended, it should be optional and default off since it looks glitchy)

TL;DR Only the body should be anchored on click; not the navbar itself in addition.

@dylanh724 dylanh724 changed the title Theme navbar jolts to nav anchor on click Sticky navbar jolts to nav anchor on click Aug 8, 2024
@humitos
Copy link
Member

humitos commented Aug 8, 2024

Hi, thanks for reporting this issue. I'm moving it to the Sphinx theme since it's related to it.

@humitos humitos transferred this issue from readthedocs/readthedocs.org Aug 8, 2024
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