mirror of
https://github.com/wukko/cobalt.git
synced 2025-02-09 12:16:30 +01:00
web/Omnibox: handle enter key press
This commit is contained in:
parent
e1bf0fb6fa
commit
35a82fb917
1 changed files with 4 additions and 0 deletions
|
@ -57,6 +57,10 @@
|
||||||
linkInput.focus();
|
linkInput.focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (e.key === "Enter" && validLink(link)) {
|
||||||
|
downloadButton.download(link);
|
||||||
|
}
|
||||||
|
|
||||||
if (['Escape', 'Clear'].includes(e.key)) {
|
if (['Escape', 'Clear'].includes(e.key)) {
|
||||||
link = "";
|
link = "";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue