An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:art: https://github.com/siyuan-note/siyuan/issues/12327
Vanessacde0840bf779
diff --git a/app/src/protyle/wysiwyg/remove.ts b/app/src/protyle/wysiwyg/remove.tsindex 1fc12776d9..30b98ffcc5 100644--- a/app/src/protyle/wysiwyg/remove.ts+++ b/app/src/protyle/wysiwyg/remove.ts@@ -511,6 +511,14 @@ export const removeBlock = async (protyle: IProtyle, blockElement: Element, rang// 图片前删除到上一个文字块时,图片前有 zwsppreviousLastElement.outerHTML = protyle.lute.SpinBlockDOM(previousLastElement.outerHTML);mathRender(getPreviousBlock(removeElement) as HTMLElement);+ const removeParentElement = removeElement.parentElement;+ // https://github.com/siyuan-note/siyuan/issues/12327+ if (removeParentElement.classList.contains("li") && removeParentElement.childElementCount === 4 &&+ removeParentElement.getAttribute("fold") === "1") {+ const foldOperations = setFold(protyle, removeParentElement, true, false, false, true);+ doOperations.push(...foldOperations.doOperations);+ undoOperations.splice(0, 0, ...foldOperations.undoOperations);+ }removeElement.remove();// extractContents 内容过多时需要进行滚动条重置,否则位置会错位protyle.contentElement.scrollTop = scroll;