Do not handle modifier hotkeys if input is not focused
This commit is contained in:
parent
7267f89377
commit
44b9597981
@ -107,6 +107,11 @@ const colorsHotkeys = {
|
||||
|
||||
for (const hotkey in colorsHotkeys) {
|
||||
Mousetrap.bind("mod+" + hotkey, function(e) {
|
||||
// Do not handle modifier hotkeys if input is not focused
|
||||
if (document.activeElement !== input[0]) {
|
||||
return;
|
||||
}
|
||||
|
||||
e.preventDefault();
|
||||
|
||||
const modifier = colorsHotkeys[e.key];
|
||||
|
Loading…
Reference in New Issue
Block a user