Skip to content

Commit

Permalink
fix(checkbox): prevent readonly toggle via space
Browse files Browse the repository at this point in the history
Prevent a checkbox change via tab+space when it is declared as readonly
  • Loading branch information
lubber-de committed Jun 5, 2023
1 parent f6ebe09 commit c3eb045
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/definitions/modules/checkbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,9 @@
$input.trigger('blur');
shortcutPressed = true;
event.stopPropagation();
} else if (!event.ctrlKey && module.can.change()) {
} else if (!module.can.change()) {
shortcutPressed = true;

This comment has been minimized.

Copy link
@batata004

batata004 Mar 20, 2024

HELLO

} else if (!event.ctrlKey) {
if (key === keyCode.space || (key === keyCode.enter && settings.enableEnterKey)) {
module.verbose('Enter/space key pressed, toggling checkbox');
module.toggle();
Expand Down

0 comments on commit c3eb045

Please sign in to comment.