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

[v2] Make Listbox submit form on Enter when not open #2972

Merged
merged 1 commit into from
Feb 6, 2024

Conversation

thecrypticace
Copy link
Contributor

@thecrypticace thecrypticace commented Feb 6, 2024

Now the <Listbox.Button> component will submit the form when enter is pressed after being focused rather than opening the listbox. This is for consistency with all other form controls in Headless UI — this also matches the behavior of native browser form controls.

Fixes #2969

Copy link

vercel bot commented Feb 6, 2024

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

Name Status Preview Updated (UTC)
headlessui-react ✅ Ready (Inspect) Visit Preview Feb 6, 2024 9:03pm
headlessui-vue ✅ Ready (Inspect) Visit Preview Feb 6, 2024 9:03pm

@thecrypticace thecrypticace changed the title Make Listbox submit form on Enter when not open [v2] Make Listbox submit form on Enter when not open Feb 6, 2024
@thecrypticace thecrypticace merged commit c71c676 into main Feb 6, 2024
8 checks passed
@thecrypticace thecrypticace deleted the feat/listbox-enter-submit-form branch February 6, 2024 21:06
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.

[a11y]: Listbox does not submit form on enter
1 participant