Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

web: close command palette if already open on Ctrl/Cmd+K/P

Abdullah Attac8d38235b2b4
diff --git a/apps/web/src/common/key-map.ts b/apps/web/src/common/key-map.ts
index 9f4df1314..9801fe2bd 100644
--- a/apps/web/src/common/key-map.ts
+++ b/apps/web/src/common/key-map.ts
@@ -193,9 +193,10 @@ const KEYMAP = [
description: "Open command palette",
action: (e: KeyboardEvent) => {
e.preventDefault();
+ CommandPaletteDialog.close();
CommandPaletteDialog.show({
isCommandMode: e.key === "k"
- });
+ }).catch(() => {});
}
}
];