Skip to content

Can't navigate to sidebar category when browsing a page within that category  #11213

@lebalz

Description

@lebalz

Have you read the Contributing Guidelines on issues?

Prerequisites

  • I'm using the latest version of Docusaurus.
  • I have tried the npm run clear or yarn clear command.
  • I have tried rm -rf node_modules yarn.lock package-lock.json and re-installing packages.
  • I have tried creating a repro with https://new.docusaurus.io.
  • I have read the console error message carefully (if applicable).

Description

#10886 enhanced the way active sidebar categories can be expanded and collapsed. But this introduced an unexpected UX - when inside a category, there is no way to open a parent category index page in the same path (this is true for all predecessor index pages).

Aufzeichnung.2025-05-28.145124.mp4

Reproducible demo

No response

Steps to reproduce

  1. Open a document category over the sidebar, e.g. https://docusaurus.io/docs/sidebar
  2. Navigate to a doc from this category, e.g. https://docusaurus.io/docs/sidebar/items
  3. Try to display the index page of the category by clicking on the category - the category collapses, but does not display it's content.

Expected behavior

I would expect the category index page to be displayed when i click on the sidebar link.

Actual behavior

The category index page opens only, when not within this category. When within this category, it toggles the visible/collapsed state.

Your environment

  • Public source code:
  • Public site URL:
  • Docusaurus version used:
  • Environment name and version (e.g. Chrome 89, Node.js 16.4):
  • Operating system and version (e.g. Ubuntu 20.04.2 LTS):

Self-service

  • I'd be willing to fix this bug myself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugAn error in the Docusaurus core causing instability or issues with its executiondomain: themeRelated to the default theme components

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions