Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: https://github.com/siyuan-note/siyuan/issues/12205 1

Vanessad2aec4865727
diff --git a/app/src/protyle/wysiwyg/transaction.ts b/app/src/protyle/wysiwyg/transaction.ts
index 09af9c4bf4..3a4665b9d4 100644
--- a/app/src/protyle/wysiwyg/transaction.ts
+++ b/app/src/protyle/wysiwyg/transaction.ts
@@ -382,6 +382,14 @@ export const onTransaction = (protyle: IProtyle, operation: IOperation, isUndo:
item.remove();
});
});
+ if (protyle.wysiwyg.element.childElementCount === 0) {
+ zoomOut({
+ protyle,
+ id: protyle.block.rootID,
+ isPushBack: false,
+ focusId: operation.id,
+ });
+ }
}
return;
}