Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow keyboard navigation even when text input is not focused #61

Merged
merged 5 commits into from
Jan 30, 2024

Conversation

glocore
Copy link
Contributor

@glocore glocore commented Nov 2, 2022

Bug

When the search input is not focused, the navigation keys don't work as expected. In the screencap below, I click elsewhere inside the palette and press the up/down arrow keys, but it scrolls the list/page instead of navigating through the list items.

720.Screen.Recording.2022-11-02.at.2.29.26.PM.mov

Fix

This fix allows the cmdk-root div to capture the navigation keybindings. This also allows the developer to use a custom search input outside the context of <Command>...</Command> (which is my use-case 😋)

@vercel
Copy link

vercel bot commented Nov 2, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
cmdk-website ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 30, 2024 4:30am

@davidthomasparks
Copy link

Any updates on this? We are experiencing the same issue.

@OwenVey
Copy link

OwenVey commented Sep 1, 2023

Would love this feature as I am looking to exactly the same thing.

@frixaco
Copy link

frixaco commented Oct 23, 2023

Same here. Would love to have this feature

@jinyang1994
Copy link

+1

jaem1n207 pushed a commit to jaem1n207/synchronize-tab-scrolling that referenced this pull request Jan 27, 2024
@pacocoursey pacocoursey merged commit 7ced152 into pacocoursey:main Jan 30, 2024
1 check passed
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.

6 participants