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

When components are placed placed inside a label element clicking on the component fires the click event twice #940

Closed
NorfAlrin opened this issue Jun 22, 2019 · 1 comment
Assignees
Labels
Type: Bug Issue contains a defect related to a specific component.
Milestone

Comments

@NorfAlrin
Copy link

I'm submitting a ...

[x] bug report
[ ] feature request

Codesandbox Case (Bug Reports)
https://codesandbox.io/s/primereact-test-k12zb

Current behavior
When components are placed placed inside a label element clicking on the component fires the click event twice.

Expected behavior
The click event should fire once

Minimal reproduction of the problem with instructions
Click the "Check box inside label" CheckBox notice how the number of clicks increase by two and the check box stays un-checked

Click the "Check box with external label:" CheckBox note the number of clicks increase by one and the check box checks.

  • Browser: [all]
  • Language: [all]
@mertsincan mertsincan self-assigned this Jun 24, 2019
@mertsincan mertsincan added the Type: Bug Issue contains a defect related to a specific component. label Jun 24, 2019
@mertsincan mertsincan added this to the 3.1.5 milestone Jun 24, 2019
@mertsincan
Copy link
Member

Thanks a lot for the sample code! Fixed now ;)

Best Regards,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a defect related to a specific component.
Projects
None yet
Development

No branches or pull requests

2 participants