Enter key closes the popup also while editing the CUSTOM preset.

This commit is contained in:
hackademix 2020-06-01 19:56:24 +02:00
parent 27ddb8124d
commit 8b4d146edc
2 changed files with 2 additions and 4 deletions

View File

@ -46,7 +46,7 @@ addEventListener("unload", e => {
addEventListener("keydown", e => {
if (e.code === "Enter") {
let focused = document.activeElement;
if (focused && focused.matches(".preset")) {
if (focused.closest(".sites")) {
close();
}
}
@ -308,7 +308,7 @@ addEventListener("unload", e => {
if (sitesUI.incognito) {
document.body.classList.add("incognito");
}
sitesUI.render(sites);
}

View File

@ -606,8 +606,6 @@ var UI = (() => {
case "Space":
if (focused.matches(".full-address")) {
UI.openSiteInfo(row.domain);
} else {
if (e.code === "Enter") return; // let the popup handle closure
}
break;
case "Home":