Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

When shift + click is done on label, checkbox click handler is not fired

more options

I am using label to check the checkbox on my website. When i press shift and then click on label, it is not working and checkbox is not checked. Have anyone any idea how i can resolve the issue?

Code snippet is:

      <input type="checkbox"  id="chkbox-id" (click)="Onclick($event)"/>
      <label for="chkbox-id"></label>
I am using label to check the checkbox on my website. When i press shift and then click on label, it is not working and checkbox is not checked. Have anyone any idea how i can resolve the issue? Code snippet is: <input type="checkbox" id="chkbox-id" (click)="Onclick($event)"/> <label for="chkbox-id"></label>

All Replies (2)

more options

Do you mean a plain click works as designed, but Shift+click does not trigger the click event?

By the way, I find it convenient to wrap the input in the label:

<label><input type="checkbox" name="chkRemember"> Remember me</label>
more options

Actually Shift+click on a label seems to behave the same as Shift+click on other text, extending a selection from the insertion point (or an implicit insertion point). I'm not sure what this feature is called.