Skip to content

Commit 1d69fa1

Browse files
committed
fixes for 90
1 parent a9e9b24 commit 1d69fa1

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

src/webpage/settings.ts

+9-4
Original file line numberDiff line numberDiff line change
@@ -1431,13 +1431,18 @@ class Settings extends Buttons {
14311431
exit.onclick = (_) => {
14321432
this.hide();
14331433
};
1434-
onkeyup = (event) => {
1434+
background.addEventListener("keyup", (event) => {
14351435
if (event.key === "Escape") {
1436+
event.preventDefault();
1437+
event.stopImmediatePropagation();
14361438
// Cancel the default action, if needed
1437-
this.hide()
1438-
}
1439-
}
1439+
this.hide();
1440+
}
1441+
});
14401442
document.body.append(background);
1443+
background.setAttribute("tabindex", "0");
1444+
background.focus();
1445+
14411446
this.html = background;
14421447
}
14431448
hide() {

0 commit comments

Comments
 (0)