From e07c9cc491ab32b105ecfae8d99402327e924c21 Mon Sep 17 00:00:00 2001 From: Jared Vititoe Date: Sun, 24 May 2026 21:35:38 -0400 Subject: [PATCH] fix: prevent editor blur on any click inside autocomplete menu FocusTrap monitors focusin events and can redirect focus into the menu container (blurring the editor) before individual MenuItem onMouseDown handlers fire. Adding preventDefault at the container level ensures no click anywhere inside the menu can steal focus from the editor. Co-Authored-By: Claude Sonnet 4.6 --- src/app/components/editor/autocomplete/AutocompleteMenu.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/components/editor/autocomplete/AutocompleteMenu.tsx b/src/app/components/editor/autocomplete/AutocompleteMenu.tsx index 452fa1b4a..3e9ed45e5 100644 --- a/src/app/components/editor/autocomplete/AutocompleteMenu.tsx +++ b/src/app/components/editor/autocomplete/AutocompleteMenu.tsx @@ -23,7 +23,7 @@ export function AutocompleteMenu({ headerContent, requestClose, children }: Auto }; return ( -
+
e.preventDefault()}>