From 9cb2d7f0f3003fdddf5037cbdf47bf1ec70a2568 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Sun, 12 Jan 2025 16:53:27 +0800 Subject: [PATCH] :bug: https://github.com/siyuan-note/siyuan/issues/13790 --- app/src/protyle/wysiwyg/commonHotkey.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/protyle/wysiwyg/commonHotkey.ts b/app/src/protyle/wysiwyg/commonHotkey.ts index ecc252dcf..62968ad48 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) => {