fix(keys): escape closes palette and cheatsheet, page keys stay quiet behind a modal
This commit is contained in:
1 parent
dea5d8c675
commit
d348697f26
2 files changed
+10
-1
No files matched your search
@@ -140,6 +140,11 @@
|
||||
keys: "Escape",
|
||||
label: "Leave field",
|
||||
run: (event) => {
|
||||
if (ui.palette || keys.sheetOpen) {
|
||||
ui.palette = false;
|
||||
keys.sheetOpen = false;
|
||||
return;
|
||||
}
|
||||
if (isEditable(event.target)) {
|
||||
(event.target as HTMLElement).blur();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user