8000 Instant navigation doesn't respect #hash · Issue #3274 · squidfunk/mkdocs-material · GitHub
[go: up one dir, main page]

Skip to content

Instant navigation doesn't respect #hash #3274

@fottsia

Description

@fottsia

Contribution guidelines

I've found a bug and checked that ...

  • ... the problem doesn't occur with the mkdocs or readthedocs themes
  • ... the problem persists when all overrides are removed, i.e. custom_dir, extra_javascript and extra_css
  • ... the documentation does not mention anything about my problem
  • ... there are no open or closed issues that are related to my problem

Description

When navigation.instant is set in mkdocs.yml, if a page1 links to page2#hash, then page2 is indeed loaded, but the #hash part is ignored.

Expected behaviour

We should navigate to the #hash header/anchor.

Actual behaviour

We are directed to the start of page2.

Steps to reproduce

Create a page1 that links to page2#anchor.

Package versions

  • Python: 3.9.9
  • MkDocs: 1.2.3
  • Material: 8.0.1

Configuration

theme:
  features:
    - navigation.instant

System information

  • Operating system: Ubuntu 22.04
  • Browser: Firefox

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssue reports a bugresolvedIssue is resolved, yet unreleased if open

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0