From fed2c8dd903d24ae301434c281f52bc37c5482bd Mon Sep 17 00:00:00 2001 From: tzhangchi Date: Thu, 8 Sep 2022 20:22:26 +0800 Subject: [PATCH] feat(edit): more robust editing experience --- libs/components/editor-blocks/src/blocks/text/TextView.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libs/components/editor-blocks/src/blocks/text/TextView.tsx b/libs/components/editor-blocks/src/blocks/text/TextView.tsx index baae481c91..094d05f755 100644 --- a/libs/components/editor-blocks/src/blocks/text/TextView.tsx +++ b/libs/components/editor-blocks/src/blocks/text/TextView.tsx @@ -90,7 +90,9 @@ export const TextView = ({ await block.removeChildren(); await block.after(nextBlock); - editor.selectionManager.activeNodeByNodeId(nextBlock.id); + setTimeout(() => { + editor.selectionManager.activeNodeByNodeId(nextBlock.id, 'start'); + }); return true; };