Merge pull request #60 from Serraniel/bugfix/#54-quick-search-hot-key-triggers-when-text-input-is-focused
#54 Avoid quick search hotkey if input is focused
This commit is contained in:
commit
1786e56df2
|
@ -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