Fix issue allowing users to select disabled checkboxes and radio using the spacebar shortcut

This commit is contained in:
yflory 2021-05-27 12:44:50 +02:00
parent 4577a3baf0
commit 3ce5d477a1

View file

@ -1177,6 +1177,7 @@ define([
var label = h('span.cp-checkmark-label', labelTxt);
$mark.keydown(function (e) {
if ($input.is(':disabled')) { return; }
if (e.which === 32) {
e.stopPropagation();
e.preventDefault();
@ -1226,6 +1227,7 @@ define([
var label = h('span.cp-checkmark-label', labelTxt);
$(mark).keydown(function (e) {
if ($input.is(':disabled')) { return; }
if (e.which === 32) {
e.stopPropagation();
e.preventDefault();