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

Fragments in URLs break sidebar auto-scrolling #2515

Closed
ehuss opened this issue Dec 31, 2024 · 0 comments · Fixed by #2517
Closed

Fragments in URLs break sidebar auto-scrolling #2515

ehuss opened this issue Dec 31, 2024 · 0 comments · Fixed by #2517
Labels
C-bug Category: A bug, incorrect or unintended behavior

Comments

@ehuss
Copy link
Contributor

ehuss commented Dec 31, 2024

Problem

If you load a URL with a fragment in it, the sidebar does not auto-scroll correctly. When loading the page, it should automatically scroll the sidebar into the current page's position (in the middle of the screen IIRC).

@notriddle Is this something you can look at? I believe this regressed from #2414 (though I haven't bisected).

Steps

Example that works: https://doc.rust-lang.org/1.83.0/reference/expressions.html#expression-precedence
Example that doesn't work: https://doc.rust-lang.org/nightly/reference/expressions.html#expression-precedence
Example that works in all versions (no fragment): https://doc.rust-lang.org/nightly/reference/expressions.html

Possible Solution(s)

No response

Notes

No response

Version

mdbook v0.4.43
and
mdbook v0.4.42

Tested on multiple browsers.
@ehuss ehuss added the C-bug Category: A bug, incorrect or unintended behavior label Dec 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: A bug, incorrect or unintended behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant