when a vanilla html input tag of type="checkbox" is used in a form, you can check/uncheck it with space if it's focused, but it also allows you to press "Enter" to submit the form (similar to what happens if you press "Enter" while a input of type text is focused).
However, the source code of the checkbox component has this line:
|
if (e.key === kbd.ENTER) e.preventDefault(); |
Is there a reason why preventing the default behaviour of the checkbox input?