Skip to content

Collapsing a text-only sidebar group hides its own title #2807

Description

@paulhibbitts

Description

Collapsing a root sidebar group with a text-only title hides the title itself, not just its nested links - leaving no way to re-expand it without reloading the page.

Expected behavior

Collapsing the group should hide only its nested list. The group's own title should stay visible and clickable so it can be expanded again.

Actual behavior

Clicking a text-only group title to collapse it hides the group's title along with its nested links. Since the title itself disappears, there's no way to click it again to re-expand - the whole group is effectively gone until the page reloads.

Steps to reproduce

  1. Enable the new sidebar-groups feature and use a _sidebar.md where a root group's heading is plain text with no link (not a heading that's itself a page link):
   - Topic
     - [Page One](page-one.md)
     - [Page Two](page-two.md)
  1. In index.html:
   window.$docsify = {
     loadSidebar: true,
     collapsibleSidebarGroups: true,
   };
  1. Click "Topic" in the sidebar to collapse it

Environment

Please let me know if any more info is helpful, thanks Paul.

Additional Information

  • Bug still occurs when all/other plugins are disabled?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Triagebugconfirmed as a bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions