mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 14:40:12 +01:00
This commit is contained in:
parent
7ac61fd9c1
commit
31b98aaaa0
1 changed files with 3 additions and 2 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue