We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a9e9b24 commit 1d69fa1Copy full SHA for 1d69fa1
src/webpage/settings.ts
@@ -1431,13 +1431,18 @@ class Settings extends Buttons {
1431
exit.onclick = (_) => {
1432
this.hide();
1433
};
1434
- onkeyup = (event) => {
+ background.addEventListener("keyup", (event) => {
1435
if (event.key === "Escape") {
1436
+ event.preventDefault();
1437
+ event.stopImmediatePropagation();
1438
// Cancel the default action, if needed
- this.hide()
- }
1439
+ this.hide();
1440
+ }
1441
+ });
1442
document.body.append(background);
1443
+ background.setAttribute("tabindex", "0");
1444
+ background.focus();
1445
+
1446
this.html = background;
1447
}
1448
hide() {
0 commit comments