-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Checkbox: double call of onClick
when event fired by mouse
#3348
Comments
We introduced some changes in #2748, and yes it comes from there. I used your code in sandbox, so we have reproduction: The issue comes from a double called |
onClick
when event fired by mouse
@layershifter I'd be happy to contribute to this one! |
@Fabianopb you're welcome 👍 |
I've been investigating this story, which is related to #2587 and I'm wondering about the order that the events are called. Currently we have
Shouldn't |
PR created! #3351 |
Heads up, I've got some local work on this that I'm implementing. I'll push later tonight or tomorrow and give an update on where it is. |
@levithomason would this impact any work carried out in #3351? The PR is ready to merge IMO, what do you think @layershifter? |
* fix(Checkbox): Let click handler call onClick to avoid duplicate calls (#3348) * fix(Checkbox): Fix test to call onClick from a click event (#3348) * fix(Checkbox): Move onClick call completely to handleChange (#3348). * fix(Checkbox): Create tests for DOM Comparisons (#3348). * revert change * Update Checkbox-test.js * Update Checkbox-test.js * Update isConformant.js * fix(Checkbox): Fix typo in handleClick comment (#3348). * fix(Checkbox): Add tests for controlled component with setState as function (#3348). * fix(Checkbox): ensure onClick is called * fix(Checkbox): Fire DOM event on controlled component tests to emulate the real behavior (#3348). * fix(Checkbox): Completely remove click handler (#3348). * small cleanup
has this been released? I'm on 0.84 and am witnessing double onClicks |
Will be released in 0.85.0. |
when will that be released? |
Releasing today. |
e.g. use the example from the docs and change the Checkbox onChange to onClick:
The text was updated successfully, but these errors were encountered: