Closed as not planned
Closed as not planned
Description
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:
- Rightbar toc-item active link is not working #1738
- Scroll active navigation/toc item into view #1567
Issue search used:
- I have skimmed the titles of all search results for closed issues with "active" and "navigation"
Reproduction
This can be reproduced on a page on the mkdocs material site: no ZIP necessary.
Steps to reproduce
- Open a browser window with a 1440x1000 size.
- Navigate to the Ensuring data privacy page.
- 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.

Browser
No response
Before submitting
- I have read and followed the bug reporting guidelines.
- I have attached links to the documentation, and possibly related issues and discussions.
- I assure that I have removed all customizations before submitting this bug report.
- I have attached a .zip file with a minimal reproduction using the built-in info plugin.