fix(keys): escape closes palette and cheatsheet, page keys stay quiet behind a modal

This commit is contained in:
hh committed 2026-10-16 04:38:27 +00:00
1 parent dea5d8c675
commit d348697f26
2 files changed
+10 -1

No files matched your search

+5 -1
View File
@@ -88,7 +88,11 @@ class Keys {
}
handle = (event: KeyboardEvent) => {
if (event.defaultPrevented || event.isComposing) {
if (
event.defaultPrevented ||
event.isComposing ||
document.querySelector("dialog:modal")
) {
return;
}
if (["Shift", "Control", "Meta", "Alt"].includes(event.key)) {