mirror of
https://github.com/imputnet/cobalt.git
synced 2025-06-28 17:38:31 +00:00
web/Omnibox: accept keyboard shortcuts only when focused
This commit is contained in:
parent
48d24ee1ea
commit
a4e0e21a97
@ -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 New Issue
Block a user