web/Omnibox: handle enter key press

This commit is contained in:
wukko 2024-07-08 19:29:30 +06:00
parent 05044922d5
commit bd2bdf326f
No known key found for this signature in database
GPG key ID: 3E30B3F26C7B4AA2

View file

@ -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 = "";
} }