Skip to content

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

:bug: https://github.com/siyuan-note/siyuan/issues/17665

Vanessae69937e3508e
diff --git a/app/src/protyle/wysiwyg/remove.ts b/app/src/protyle/wysiwyg/remove.ts
index a2be020237..c598a522df 100644
--- a/app/src/protyle/wysiwyg/remove.ts
+++ b/app/src/protyle/wysiwyg/remove.ts
@@ -305,7 +305,7 @@ export const removeBlock = async (protyle: IProtyle, blockElement: Element, rang
action: "move",
id: blockElement.getAttribute("data-node-id"),
previousID: blockElement.previousElementSibling?.getAttribute("data-node-id"),
- parentID: blockParentElement.parentElement.getAttribute("data-node-id") || protyle.block.parentID
+ parentID: getParentBlock(blockParentElement).getAttribute("data-node-id") || protyle.block.parentID
}, {
action: "delete",
id: blockParentElement.getAttribute("data-node-id")
@@ -314,7 +314,7 @@ export const removeBlock = async (protyle: IProtyle, blockElement: Element, rang
id: blockParentElement.getAttribute("data-node-id"),
data: blockParentElement.outerHTML,
previousID: blockElement.previousElementSibling?.getAttribute("data-node-id"),
- parentID: blockParentElement.parentElement.getAttribute("data-node-id") || protyle.block.parentID
+ parentID: getParentBlock(blockElement).getAttribute("data-node-id") || protyle.block.parentID
}, {
action: "move",
id: blockElement.getAttribute("data-node-id"),
@@ -326,7 +326,7 @@ export const removeBlock = async (protyle: IProtyle, blockElement: Element, rang
action: "move",
id: blockElement.getAttribute("data-node-id"),
previousID: blockElement.previousElementSibling?.getAttribute("data-node-id"),
- parentID: blockParentElement.parentElement.getAttribute("data-node-id") || protyle.block.parentID
+ parentID: getParentBlock(blockParentElement).getAttribute("data-node-id") || protyle.block.parentID
}], [{
action: "move",
id: blockElement.getAttribute("data-node-id"),