#54 Avoid quick search hotkey if input is focused
This commit is contained in:
parent
2ce76e3300
commit
1c57d1f45c
|
@ -64,7 +64,12 @@ function handleQuickSearch(event) {
|
|||
|
||||
function handleSearchForShiftF(event) {
|
||||
if (helper.isShiftPressed) {
|
||||
if (event.key === 'F') {
|
||||
// check if some kind of input is focused already; we then prevent our hotkey
|
||||
if (document.activeElement instanceof HTMLInputElement || document.activeElement.isContentEditable) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (event.code === 'KeyF') {
|
||||
event.preventDefault();
|
||||
document.getElementById(quickSearchID).focus();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue