From b693edac8c1335b2a1de2cc8df8c95394dcedf48 Mon Sep 17 00:00:00 2001 From: Michael Freno Date: Fri, 26 Dec 2025 16:18:22 -0500 Subject: [PATCH] remove on cursor move --- src/components/blog/TextEditor.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/components/blog/TextEditor.tsx b/src/components/blog/TextEditor.tsx index 971f460..92e6753 100644 --- a/src/components/blog/TextEditor.tsx +++ b/src/components/blog/TextEditor.tsx @@ -1363,6 +1363,11 @@ export default function TextEditor(props: TextEditorProps) { }); }, onSelectionUpdate: ({ editor }) => { + // Clear suggestion when cursor moves (click/arrow keys without suggestion) + if (currentSuggestion()) { + setCurrentSuggestion(""); + } + // Force reactive update for button states setEditorState((prev) => prev + 1);