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

Vanessa9cb2d7f0f300
diff --git a/app/src/protyle/wysiwyg/commonHotkey.ts b/app/src/protyle/wysiwyg/commonHotkey.ts
index ecc252dcf0..62968ad48d 100644
--- a/app/src/protyle/wysiwyg/commonHotkey.ts
+++ b/app/src/protyle/wysiwyg/commonHotkey.ts
@@ -255,7 +255,8 @@ export const duplicateBlock = (nodeElements: Element[], protyle: IProtyle) => {
const doOperations: IOperation[] = [];
const undoOperations: IOperation[] = [];
let starIndex: number;
- if (nodeElements[nodeElements.length - 1].getAttribute("data-subtype") === "o") {
+ if (nodeElements[nodeElements.length - 1].classList.contains("li") &&
+ nodeElements[nodeElements.length - 1].getAttribute("data-subtype") === "o") {
starIndex = parseInt(nodeElements[nodeElements.length - 1].getAttribute("data-marker"), 10);
}
nodeElements.reverse().forEach((item, index) => {