remove on cursor move
This commit is contained in:
@@ -1363,6 +1363,11 @@ export default function TextEditor(props: TextEditorProps) {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
onSelectionUpdate: ({ editor }) => {
|
onSelectionUpdate: ({ editor }) => {
|
||||||
|
// Clear suggestion when cursor moves (click/arrow keys without suggestion)
|
||||||
|
if (currentSuggestion()) {
|
||||||
|
setCurrentSuggestion("");
|
||||||
|
}
|
||||||
|
|
||||||
// Force reactive update for button states
|
// Force reactive update for button states
|
||||||
setEditorState((prev) => prev + 1);
|
setEditorState((prev) => prev + 1);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user