Skip to content

armgit / plane

Public Imported from GitHub
0

πŸ”₯πŸ”₯πŸ”₯ Open-source Jira, Linear, Monday, and ClickUp alternative. Plane is a modern project management platform to manage tasks, sprints, docs, and triage.

[WEB-1801] fix: avoid opening shortcut guide on editors / input elements. (#5025)

Prateek Shouryadb722d580f44
diff --git a/web/core/components/command-palette/command-palette.tsx b/web/core/components/command-palette/command-palette.tsx
index acb1701d21..619cdd9208 100644
--- a/web/core/components/command-palette/command-palette.tsx
+++ b/web/core/components/command-palette/command-palette.tsx
@@ -206,10 +206,6 @@ export const CommandPalette: FC = observer(() => {
toggleCommandPaletteModal(true);
}
- if (shiftClicked && (keyPressed === "?" || keyPressed === "/") && !isAnyModalOpen) {
- e.preventDefault();
- toggleShortcutModal(true);
- }
// if on input, textarea or editor, don't do anything
if (
e.target instanceof HTMLTextAreaElement ||
@@ -218,6 +214,11 @@ export const CommandPalette: FC = observer(() => {
)
return;
+ if (shiftClicked && (keyPressed === "?" || keyPressed === "/") && !isAnyModalOpen) {
+ e.preventDefault();
+ toggleShortcutModal(true);
+ }
+
if (cmdClicked) {
if (keyPressed === "c" && ((platform === "MacOS" && ctrlKey) || altKey)) {
e.preventDefault();