web/Omnibox: accept keyboard shortcuts only when focused
This commit is contained in:
parent
48d24ee1ea
commit
a4e0e21a97
1 changed files with 2 additions and 2 deletions
|
@ -83,11 +83,11 @@
|
|||
linkInput.focus();
|
||||
}
|
||||
|
||||
if (e.key === "Enter" && validLink($link)) {
|
||||
if (e.key === "Enter" && validLink($link) && isFocused) {
|
||||
downloadButton.download($link);
|
||||
}
|
||||
|
||||
if (["Escape", "Clear"].includes(e.key)) {
|
||||
if (["Escape", "Clear"].includes(e.key) && isFocused) {
|
||||
$link = "";
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue