From 6cba470b69396c0da5d6740a9ed5fe307a675ab2 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Sun, 12 Jun 2022 22:22:18 +0800 Subject: [PATCH] :bug: fix https://github.com/siyuan-note/siyuan/issues/5168 --- app/src/block/util.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/block/util.ts b/app/src/block/util.ts index d60a5ef30..b27888257 100644 --- a/app/src/block/util.ts +++ b/app/src/block/util.ts @@ -54,7 +54,8 @@ export const insertEmptyBlock = (protyle: IProtyle, position: InsertPosition, id const parentOldHTML = blockElement.parentElement.outerHTML; const newId = newElement.getAttribute("data-node-id"); blockElement.insertAdjacentElement(position, newElement); - if (blockElement.getAttribute("data-type") === "NodeListItem" && blockElement.getAttribute("data-subtype") === "o") { + if (blockElement.getAttribute("data-type") === "NodeListItem" && blockElement.getAttribute("data-subtype") === "o" && + !newElement.parentElement.classList.contains("protyle-wysiwyg")) { updateListOrder(newElement.parentElement, orderIndex); updateTransaction(protyle, newElement.parentElement.getAttribute("data-node-id"), newElement.parentElement.outerHTML, parentOldHTML); } else {