From bf9c833a276195b3882b8c892d20814333b1364e Mon Sep 17 00:00:00 2001 From: Vanessa Date: Tue, 25 Oct 2022 01:15:52 +0800 Subject: [PATCH] :bug: list --- app/src/protyle/wysiwyg/list.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/protyle/wysiwyg/list.ts b/app/src/protyle/wysiwyg/list.ts index 39a058ae1..1fc5a4e6c 100644 --- a/app/src/protyle/wysiwyg/list.ts +++ b/app/src/protyle/wysiwyg/list.ts @@ -537,12 +537,12 @@ export const listOutdent = (protyle: IProtyle, liItemElements: Element[], range: lastBlockElement.setAttribute("data-type", "NodeList"); lastBlockElement.setAttribute("updated", dayjs().format("YYYYMMDDHHmmss")); lastBlockElement.innerHTML = `
${Constants.ZWSP}
`; - parentLiItemElement.after(lastBlockElement); + liItemElements[0].lastElementChild.before(lastBlockElement); doOperations.push({ action: "insert", id: newId, data: lastBlockElement.outerHTML, - previousID: parentLiItemElement.getAttribute("data-node-id"), + previousID: liItemElements[0].lastElementChild.previousElementSibling.getAttribute("data-node-id"), }); } let previousID;