You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a checkbox is inside a <form>, any update on its checked prop will trigger an onClick event that will propagate to its parent.
Bug found while making a form with a select all checkbox that would mark all the other checkboxes as checked.
The other checkboxes were located inside <div> that were clickable.
The onClick event originates from the internal <input> used by the checkbox.
Expected behavior
The event on the internal <input> should not propagate to the parent.
It also shouldn't be triggered after an update on the checked prop.
Bug report
Current Behavior
When a checkbox is inside a
<form>
, any update on itschecked
prop will trigger anonClick
event that will propagate to its parent.Bug found while making a form with a
select all
checkbox that would mark all the other checkboxes as checked.The other checkboxes were located inside
<div>
that were clickable.The
onClick
event originates from the internal<input>
used by the checkbox.Expected behavior
The event on the internal
<input>
should not propagate to the parent.It also shouldn't be triggered after an update on the
checked
prop.Reproducible example
CodeSandbox example
Suggested solution
See Expected behavior.
Additional context
Might be the same issue as #3192 and #2704.
Your environment
The text was updated successfully, but these errors were encountered: