I have an input and a checkbox, when the input is focused it display some information under it.
The problem is : when those information are displayed if I click on the checkbox it hides the information (because my input is not focused anymore) but the checkbox is not checked.
Here is a working plunker which reproduce this behavior.
Is there a way to make the checkbox
checked in this scenario ?
EDIT :
I think the problem is because the input loose the focus on the event mousedown
and the checkbox is checked on the event mouseup
(or maybe click
) so when the mouseup
event is fired the input has already lost the focus so the message under it is hidden and the checkbox moves up. So when the mouseup
event is fired the cursor is not anymore on the checkbox, that's why the checkbox is not checked.