Repository navigation
fix(tree-view, listbox): let lowercase a reach typeahead - #3509
Merged
segunadebayo merged 2 commits intoOct 21, 2026
Merged
Conversation
The keydown handler has an `a` entry for the Cmd+A select all shortcut. Without the meta key it returned early, but the dispatcher still stopped there because a handler existed, so a plain `a` never reached typeahead. Only use that handler when the meta key is pressed. Closes chakra-ui#3489 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Same problem as in tree-view: the `a` entry for the Ctrl/Cmd+A select all shortcut caught every lowercase `a`, so typeahead never saw it. Only use that handler when ctrl or meta is pressed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #3489
📝 Description
In tree-view, the keydown handler has an
aentry for the Cmd+A select all shortcut. Without the meta key it returns early, but the dispatcher still stops there because a handler exists, so a plainanever gets to typeahead. This applies the fix suggested in the issue. Listbox has the same pattern with Ctrl/Cmd+A, so I fixed it there too.⛳️ Current behavior (updates)
Typing
adoes nothing in a tree view or listbox with typeahead, and any prefix containinga(likeabofor "About") doesn't match.🚀 New behavior
ahandler only runs when the select all modifier is pressed (meta for tree-view, ctrl or meta for listbox, the same checks as in the handlers). Otherwise the key goes to typeahead.afromindex.tsfocusesapp.tsx,pacfocusespackage.json) and listbox (afrom Andorra highlights Afghanistan). They fail on main and pass with the fix.@zag-js/tree-viewand@zag-js/listbox.💣 Is this a breaking change (Yes/No):
No
📝 Additional Information
I used Claude Code to write this change.