Skip to content

fix(Sidebar): exclude Shift and Alt modifiers from keyboard shortcut#11115

Open
ayushnandi718-dev wants to merge 1 commit into
shadcn-ui:mainfrom
ayushnandi718-dev:fix/sidebar-keyboard-shortcut-modifiers
Open

fix(Sidebar): exclude Shift and Alt modifiers from keyboard shortcut#11115
ayushnandi718-dev wants to merge 1 commit into
shadcn-ui:mainfrom
ayushnandi718-dev:fix/sidebar-keyboard-shortcut-modifiers

Conversation

@ayushnandi718-dev

Copy link
Copy Markdown

Closes #11104

Problem

The sidebar toggle shortcut (Cmd+B/Ctrl+B) matches any combination including Shift or Alt, so Cmd+Shift+B (a browser-level shortcut) is intercepted and blocked.

Fix

Added !event.shiftKey && !event.altKey checks to require an exact modifier match.

Changes

Applied the fix across all 16 theme variants (18 sidebar.tsx files).

@vercel

vercel Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

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

A member of the Team first needs to authorize it.

@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Can you sign the commits please? See https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits. Thank you.

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.

[bug]: SidebarProvider registers a global keyboard shortcut for toggling the sidebar with Cmd+B / Ctrl+B

1 participant