I recently ran into this situation (simplified here). Just wrap the checkbox with the element and apply preventDefault () on it with the click event, and the checkbox will become unavailable.
Check out this script , but here's a snapshot:
<div> <input type="checkbox"/> </div> $('div').on('click', function(e){ e.preventDefault(); });
The behavior happens in Chrome and FF, so I assume this is intentional.
Why does the click event that was already fired with this flag not cause the flag to be enabled? preventDefault for the ancestor seems to be irrelevant for the child's checkbox behavior. It looks like the click event should bubble freely to the root of the document to change the flag.
What's going on here?
peteorpeter
source share