Skip to content

Fragments in URLs break sidebar auto-scrolling #2515

@ehuss

Description

@ehuss

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: A bug, incorrect or unintended behavior

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions