From 31b98aaaa038a9b0213adbad65d4288ed9f72f25 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Thu, 20 Nov 2025 23:21:43 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/issues/16253 --- app/src/protyle/wysiwyg/list.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/protyle/wysiwyg/list.ts b/app/src/protyle/wysiwyg/list.ts index 914179916..9257fdf47 100644 --- a/app/src/protyle/wysiwyg/list.ts +++ b/app/src/protyle/wysiwyg/list.ts @@ -276,7 +276,7 @@ export const breakList = (protyle: IProtyle, blockElement: Element, range: Range action: "delete" }); - Array.from(listItemElement.children).reverse().forEach((item) => { + Array.from(listItemElement.children).reverse().forEach((item, index) => { if (!item.classList.contains("protyle-action") && !item.classList.contains("protyle-attr")) { doOperations.push({ id: item.getAttribute("data-node-id"), @@ -286,7 +286,8 @@ export const breakList = (protyle: IProtyle, blockElement: Element, range: Range undoOperations.push({ id: item.getAttribute("data-node-id"), action: "move", - parentID: listItemId + parentID: listItemId, + data: index === listItemElement.childElementCount - 2 ? "focus" : null }); listItemElement.parentElement.after(item); }