mirror of
https://github.com/imputnet/cobalt.git
synced 2025-07-18 19:28:29 +00:00
front: autofocus entry, enter close popups
This commit is contained in:
parent
85bed9aa74
commit
dfad179736
@ -651,6 +651,7 @@ window.onload = () => {
|
|||||||
changeDownloadButton("hidden");
|
changeDownloadButton("hidden");
|
||||||
eid("url-input-area").value = "";
|
eid("url-input-area").value = "";
|
||||||
|
|
||||||
|
|
||||||
if (isIOS) {
|
if (isIOS) {
|
||||||
sSet("downloadPopup", "true");
|
sSet("downloadPopup", "true");
|
||||||
eid("downloadPopup-chkbx").style.display = "none";
|
eid("downloadPopup-chkbx").style.display = "none";
|
||||||
@ -670,6 +671,7 @@ window.onload = () => {
|
|||||||
if (isIOS) {
|
if (isIOS) {
|
||||||
document.addEventListener('touchstart', () => {}, true);
|
document.addEventListener('touchstart', () => {}, true);
|
||||||
}
|
}
|
||||||
|
eid("url-input-area").focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
eid("url-input-area").addEventListener("keydown", () => {
|
eid("url-input-area").addEventListener("keydown", () => {
|
||||||
@ -703,6 +705,6 @@ document.onkeydown = (e) => {
|
|||||||
if (e.key === "M") popup('settings', 1);
|
if (e.key === "M") popup('settings', 1);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if (e.key === "Escape") hideAllPopups();
|
if (e.key === "Escape" || e.key === "Enter") hideAllPopups();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user