From 01e60e478bb4baf4d92288c023a265d2cfe6c2e1 Mon Sep 17 00:00:00 2001 From: tzhangchi Date: Sat, 10 Sep 2022 09:40:48 +0800 Subject: [PATCH] feat(command): ensure useOnSelectActive run --- libs/components/editor-plugins/src/menu/command-menu/Menu.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/components/editor-plugins/src/menu/command-menu/Menu.tsx b/libs/components/editor-plugins/src/menu/command-menu/Menu.tsx index 1bdda4e739..66b2679220 100644 --- a/libs/components/editor-plugins/src/menu/command-menu/Menu.tsx +++ b/libs/components/editor-plugins/src/menu/command-menu/Menu.tsx @@ -227,7 +227,7 @@ export const CommandMenu = ({ editor, hooks, style }: CommandMenuProps) => { const nextBlock = await block.nextSibling(); setTimeout(() => { editor.selectionManager.activeNodeByNodeId(nextBlock.id); - }); + }, 100); if (block.blockProvider.isEmpty()) { block.remove(); }