Skip to content

Improvement: Prevent full-page reload when clicking active navigation links #885

@alankritdabral

Description

@alankritdabral

Issue

Clicking a navigation item for the page you are already on triggers a full-page reload instead of simply moving the user to the top of the page.

This is most noticeable in the sidebar, where the page reload causes a brief flash while the sidebar reinitializes and collapses again. The same behavior also exists in the top navigation for active items, active dropdown items, and the homepage logo when already on the landing page.

Affected areas

  • Sidebar active link
  • Top navigation active link
  • Top navigation active dropdown link
  • Navbar brand/logo on the homepage

Proposed fix

  • Add a shared top-of-page anchor such as id="page-top" to the main layouts.
  • For active navigation entries, use href="#page-top" instead of linking back to the same permalink.
  • Add aria-current="page" for the active link where appropriate.
Screencast.from.2026-04-15.18-18-08.mp4

Metadata

Metadata

Assignees

No one assigned

    Labels

    GSoCContributed in the context of the Google Summer of CodetechnicalTechnical issues on the website

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions