Skip to content

rustdoc: back navigation in jump to definition is sometimes broken #101177

Open
@jsha

Description

@jsha

Steps to reproduce (Chrome / Linux):

  1. Visit https://doc.rust-lang.org/nightly/nightly-rustc/rustdoc/clean/index.html
  2. Click source link (https://doc.rust-lang.org/nightly/nightly-rustc/src/rustdoc/clean/mod.rs.html#1-2243)
  3. Scroll down in page until you see a link that goes elsewhere within the same file (e.g. doc on line 104)
  4. Click the link.
  5. Navigate back in the browser.

Expected result:

The browser now shows the scroll position from before clicking the link.

Actual result:

The scroll position is the top of the page.

This seems to only happen when the first navigation included a fragment (e.g. #1-2243 in this example)

/cc @GuillaumeGomez

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-link-to-definitionrustdoc --generate-link-to-definition nightly-only featureA-rustdoc-uiArea: Rustdoc UI (generated HTML)T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions