Skip to content

fix(core): ignore a keydown with no key when matching shortcuts - #920

Open
shadcn wants to merge 1 commit into
mainfrom
shadcn/fix-shortcut-keydown-without-key
Open

shadcn wants to merge 1 commit into
mainfrom
shadcn/fix-shortcut-keydown-without-key

Conversation

@shadcn

@shadcn shadcn commented Nov 19, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #919

Chrome's autofill sends a keydown that isn't a KeyboardEvent, so it has no key. The shortcut listener read event.key.length on it and threw on every autofill on any page with a ToastRegion. matchesShortcut now returns false when the event has no key. The new test fails on main.

@vercel

vercel Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
ui Ready Ready Preview, v0 Nov 19, 2026 10:50pm UTC

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.

Shortcuts: a keydown with no key, like Chrome's autofill, throws in matchesKey

1 participant