|
|
@ -150,13 +150,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
// Ignore shortcuts if any text input is focused
|
|
|
|
// Ignore shortcuts if any text input is focused
|
|
|
|
let focused_tag = document.activeElement.tagName.toLowerCase();
|
|
|
|
let focused_tag = document.activeElement.tagName.toLowerCase();
|
|
|
|
let focused_type = document.activeElement.type.toLowerCase();
|
|
|
|
const allowed = /^(button|checkbox|file|radio|submit)$/;
|
|
|
|
let allowed = /^(button|checkbox|file|radio|submit)$/;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (focused_tag === "textarea" ||
|
|
|
|
if (focused_tag === "textarea") return;
|
|
|
|
(focused_tag === "input" && !focused_type.match(allowed))
|
|
|
|
if (focused_tag === "input") {
|
|
|
|
)
|
|
|
|
let focused_type = document.activeElement.type.toLowerCase();
|
|
|
|
return;
|
|
|
|
if (!focused_type.match(allowed)) return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Focus search bar on '/'
|
|
|
|
// Focus search bar on '/'
|
|
|
|
if (event.key == "/") {
|
|
|
|
if (event.key == "/") {
|
|
|
|