Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

feat(command): ensure useOnSelectActive run

tzhangchi01e60e478bb4
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();
}