diff --git a/packages/core/src/text-area/syncSelection.ts b/packages/core/src/text-area/syncSelection.ts index d178d194d..93501c5c5 100644 --- a/packages/core/src/text-area/syncSelection.ts +++ b/packages/core/src/text-area/syncSelection.ts @@ -172,6 +172,8 @@ export function DOMSelectionToEditor(textarea: TextArea, editor: IDomEditor) { IS_FOCUSED.set(editor, true) } else { IS_FOCUSED.delete(editor) + Transforms.deselect(editor) + return } if (!domSelection) { diff --git a/packages/table-module/src/module/with-selection.ts b/packages/table-module/src/module/with-selection.ts index fc43f8056..c6ccf3858 100644 --- a/packages/table-module/src/module/with-selection.ts +++ b/packages/table-module/src/module/with-selection.ts @@ -34,7 +34,7 @@ export function withSelection(editor: T) { }) if (!fromEntry || !toEntry) { - // TableCursor.unselect(editor) + TableCursor.unselect(editor) return apply(op) }