Skip to content

Commit 142b5cc

Browse files
committed
allow hotkeys to operate during checkbox focus
1 parent bf9b7f6 commit 142b5cc

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

packages/common-ui/src/utils/SkldrMouseTrap.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,15 @@ export interface HotKeyMetaData {
1717
*/
1818
function inputElementIsFocused(): boolean {
1919
const activeElement = document.activeElement;
20+
21+
// Special handling for checkbox and radio inputs
22+
if (
23+
activeElement instanceof HTMLInputElement &&
24+
(activeElement.type === 'checkbox' || activeElement.type === 'radio')
25+
) {
26+
return false;
27+
}
28+
2029
return (
2130
activeElement instanceof HTMLElement &&
2231
(activeElement.tagName === 'INPUT' ||

0 commit comments

Comments
 (0)