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

fix(FormGroup): prevent input click from propagating to label #651

Merged
merged 1 commit into from
Sep 12, 2023
Merged

fix(FormGroup): prevent input click from propagating to label #651

merged 1 commit into from
Sep 12, 2023

Conversation

romhml
Copy link
Collaborator

@romhml romhml commented Sep 10, 2023

Fixes #621

The problem was caused by input click events being handled by the <label> which sets focus to the nested input. This creates issues with interactive components like SelectMenu, where selecting a value triggers both the component to close and the label to open it.

Here is a reproduction: https://stackblitz.com/edit/nuxt-ui-xj1xrv?file=app.vue

@vercel
Copy link

vercel bot commented Sep 10, 2023

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

Name Status Preview Updated (UTC)
ui ✅ Ready (Inspect) Visit Preview Sep 12, 2023 9:07am

@romhml romhml changed the title fix(SelectMenu): prevent click event propagation on menu fix(FormGroup): prevent input click from propagating to label Sep 12, 2023
@benjamincanac benjamincanac merged commit 4c58330 into nuxt:dev Sep 12, 2023
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.

SelectMenu does not close dropdown on click when within UFormGroup
2 participants