Skip to content

Ensure clicking on interactive elements inside <Label> works - #3709

Merged
RobinMalfait merged 2 commits into
mainfrom
fix/issue-3658
Apr 25, 2025
Merged

RobinMalfait merged 2 commits into
mainfrom
fix/issue-3658

Conversation

@RobinMalfait

Copy link
Copy Markdown
Collaborator

This PR fixes an issue where clicking on an interactive element inside of a <Label> component should work as expected.

For example, if you have this situation:

<label for="tac">
  <input id="tac" type="checkbox" name="terms-and-conditions" />
  I agree to the <a href="terms-and-conditions.html">Terms and Conditions</a>
</label>

Clicking on the <a href="#"> inside the label should not check the checkbox, but should open the link instead.

Fixes: #3658

@vercel

vercel Bot commented Apr 25, 2025 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git β†—οΈŽ

Name Status Preview Comments Updated (UTC)
headlessui-react βœ… Ready (Inspect) Visit Preview πŸ’¬ Add feedback Apr 25, 2025 11:47am
headlessui-vue βœ… Ready (Inspect) Visit Preview πŸ’¬ Add feedback Apr 25, 2025 11:47am

This branch was successfully deployed

2 active deployments
Preview – headlessui-react β€” d0073090 Deployed Apr 25, 2025 by vercel[bot]
Preview – headlessui-vue β€” d0073090 Deployed Apr 25, 2025 by vercel[bot]
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.

Unable to click links in <Label> Components

1 participant