Skip to content

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

:art: fix https://github.com/siyuan-note/siyuan/issues/11798

Vanessaff8d2acb9bee
diff --git a/app/src/protyle/wysiwyg/transaction.ts b/app/src/protyle/wysiwyg/transaction.ts
index 5529795a93..2dbd339023 100644
--- a/app/src/protyle/wysiwyg/transaction.ts
+++ b/app/src/protyle/wysiwyg/transaction.ts
@@ -1191,6 +1191,14 @@ export const transaction = (protyle: IProtyle, doOperations: IOperation[], undoO
transactionsTimeout = window.setTimeout(() => {
promiseTransaction();
}, Constants.TIMEOUT_INPUT * 2);
+
+ // 插入块后会导致高度变化,从而产生再次定位 https://github.com/siyuan-note/siyuan/issues/11798
+ doOperations.find(item => {
+ if (item.action === "insert") {
+ protyle.observerLoad.disconnect()
+ return true;
+ }
+ })
};
export const updateTransaction = (protyle: IProtyle, id: string, newHTML: string, html: string) => {