feat(command): ensure useOnSelectActive run

This commit is contained in:
tzhangchi
2022-09-10 09:40:48 +08:00
parent 8cc88395d7
commit 01e60e478b

View File

@@ -227,7 +227,7 @@ export const CommandMenu = ({ editor, hooks, style }: CommandMenuProps) => {
const nextBlock = await block.nextSibling(); const nextBlock = await block.nextSibling();
setTimeout(() => { setTimeout(() => {
editor.selectionManager.activeNodeByNodeId(nextBlock.id); editor.selectionManager.activeNodeByNodeId(nextBlock.id);
}); }, 100);
if (block.blockProvider.isEmpty()) { if (block.blockProvider.isEmpty()) {
block.remove(); block.remove();
} }