A full-featured CRM built with React, shadcn/ui, and Supabase.
Explain why the search shortcut skips editable elements
François Zaninotto9db2e0b90125
diff --git a/src/components/atomic-crm/search/GlobalSearchButton.tsx b/src/components/atomic-crm/search/GlobalSearchButton.tsxindex 5c992486..fd13560a 100644--- a/src/components/atomic-crm/search/GlobalSearchButton.tsx+++ b/src/components/atomic-crm/search/GlobalSearchButton.tsx@@ -6,6 +6,10 @@ import { Button } from "@/components/ui/button";import { GlobalSearchDialog } from "./GlobalSearchDialog";+// Whether the keyboard shortcut fired while the user is typing in a field, in+// which case it must not open the dialog. contenteditable covers rich text+// editors (Tiptap, Lexical...), which have no such field today but commonly+// bind Ctrl/Cmd+K to "insert link".const isEditableTarget = (target: EventTarget | null): boolean => {if (!(target instanceof HTMLElement)) {return false;