mirror of
https://github.com/imputnet/cobalt.git
synced 2025-07-18 19:28:29 +00:00
do what wukko said
This commit is contained in:
parent
dfad179736
commit
61eaf772ac
@ -353,6 +353,7 @@ const popup = (type, action, text) => {
|
|||||||
eid("popup-backdrop").classList.toggle("visible");
|
eid("popup-backdrop").classList.toggle("visible");
|
||||||
eid(`popup-${type}`).classList.toggle("visible");
|
eid(`popup-${type}`).classList.toggle("visible");
|
||||||
eid(`popup-${type}`).focus();
|
eid(`popup-${type}`).focus();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const changeSwitcher = (switcher, state) => {
|
const changeSwitcher = (switcher, state) => {
|
||||||
@ -671,7 +672,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", () => {
|
||||||
@ -705,6 +706,7 @@ document.onkeydown = (e) => {
|
|||||||
if (e.key === "M") popup('settings', 1);
|
if (e.key === "M") popup('settings', 1);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if (e.key === "Escape" || e.key === "Enter") hideAllPopups();
|
if (e.key === "Escape") hideAllPopups();
|
||||||
|
if (e.key === "Enter") popup('error', 0); eid("url-input-area").focus(); //Close the popup, then focus on input area again.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user