Skip to content

Incorrect secondary nav item is displayed as active despite correct URL hash #8210

Closed as not planned
@jrinehart-buf

Description

@jrinehart-buf

Context

No response

Bug description

On a vertically "tall" display, if a user navigates to the last item in the secondary navigation and the item's content doesn't occupy enough space to scroll past prior sections, the secondary navigation displays the prior section as "active." The URL contains the correct hash, which leads me to think that it could be used to resolve the user's intent, despite the scroll position of the page.

Related links

Documentation reviewed:

Possibly related issues:

Issue search used:

Reproduction

This can be reproduced on a page on the mkdocs material site: no ZIP necessary.

Steps to reproduce

  1. Open a browser window with a 1440x1000 size.
  2. Navigate to the Ensuring data privacy page.
  3. Click "Custom Cookies" in the secondary navigation.

I would expect "Custom Cookies" to be displayed as active because the URL hash ends in #custom-cookies, but "Advanced Settings" is displayed as active.

Image

Browser

No response

Before submitting

Metadata

Metadata

Assignees

No one assigned

    Labels

    not fixableIssue concerns an unfixable bug

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions