From 3ce5d477a17cb903c30e0631ebae9e25e9281753 Mon Sep 17 00:00:00 2001 From: yflory Date: Thu, 27 May 2021 12:44:50 +0200 Subject: [PATCH] Fix issue allowing users to select disabled checkboxes and radio using the spacebar shortcut --- www/common/common-interface.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/www/common/common-interface.js b/www/common/common-interface.js index bba514dbf..4166c0902 100644 --- a/www/common/common-interface.js +++ b/www/common/common-interface.js @@ -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();