Skip to content

fix(registry): add pointer-events-none to collapsed sidebar-group-label & reduce transition duration to 100 - #11312

Open
hardik88t wants to merge 1 commit into
shadcn-ui:mainfrom
hardik88t:fix/collapsed-sidebar-pointer-events-issue
Open

fix(registry): add pointer-events-none to collapsed sidebar-group-label & reduce transition duration to 100#11312
hardik88t wants to merge 1 commit into
shadcn-ui:mainfrom
hardik88t:fix/collapsed-sidebar-pointer-events-issue

Conversation

@hardik88t

Copy link
Copy Markdown

Description

Fixes hit-testing overlap bug where the hidden SidebarGroupLabel blocks hover and click interactions on the bottom half of the last menu item in the preceding group when the sidebar is collapsed to icon mode.

Also reduces transition duration of SidebarGroupLabel to 100ms to sync better with the sidebar collapse animation.

Nuance (Why I think only some items are blocked)

In CSS stacking context, elements appearing later in the DOM tree render on top of earlier elements by default. Thus, the SidebarGroupLabel at the start of a group overlaps the last item of the group above it. The switcher at the top is not blocked because of DOM order and spacing.

Changes

  • Added group-data-[collapsible=icon]:pointer-events-none to SidebarGroupLabel to pass pointer events through when hidden.
  • Adjusted transition duration on the label to duration-100 to prevent delayed floating visual artifacts during collapse.

Attachment & Example

Nuance: This Issue was not happening at the Official Example Sidebar Team switcher (Or The org switcher in my project) example even when I can see with select element browser-dev-tool that SidebarGroupLabel was covering half of space. But it was not half disabled. i dont know the reason.

SS from https://ui.shadcn.com/docs/components/base/sidebar:
image

SS Example from my Project: (Nuance, working properly but i can see SidebarGroupLabel was covering bottom half of it)
image

Issue Example from my Project: (The Half covered by the hidden SidebarGroupLabel is unresponsive to cllick or hover)
image

Same issue here as well:
image

For ref my app sidebar un-collapsed:
image

My first PR to this repo. tried best to follow contribution guidline. tell me if there is some changes needed in this.

@vercel

vercel Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

@hardik88t is attempting to deploy a commit to the shadcn-pro Team on Vercel.

A member of the Team first needs to authorize it.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant