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/11984

Vanessa2a7702a78b69
diff --git a/app/src/protyle/wysiwyg/remove.ts b/app/src/protyle/wysiwyg/remove.ts
index e206325b24..1869605f19 100644
--- a/app/src/protyle/wysiwyg/remove.ts
+++ b/app/src/protyle/wysiwyg/remove.ts
@@ -260,7 +260,7 @@ export const removeBlock = (protyle: IProtyle, blockElement: Element, range: Ran
data: previousElement.outerHTML,
id: previousElement.getAttribute("data-node-id"),
parentID: previousElement.parentElement.getAttribute("data-node-id") || protyle.block.parentID,
- previousID: ppElement ? ppElement.getAttribute("data-node-id") : undefined
+ previousID: (ppElement && (!previousElement.previousElementSibling || !previousElement.previousElementSibling.classList.contains("protyle-action"))) ? ppElement.getAttribute("data-node-id") : undefined
}]);
previousElement.remove();
} else {