diff --git a/app/src/protyle/util/editorCommonEvent.ts b/app/src/protyle/util/editorCommonEvent.ts index 0ee75d107..fb3e8e62a 100644 --- a/app/src/protyle/util/editorCommonEvent.ts +++ b/app/src/protyle/util/editorCommonEvent.ts @@ -333,13 +333,15 @@ const dragSame = async (protyle: IProtyle, sourceElements: Element[], targetElem item.removeAttribute("fold"); foldHeadingIds.push(id); const headingIds = await fetchSyncPost("/api/block/getHeadingChildrenIDs", {id}) - headingIds.data.reverse().forEach((headingId: string) => { + headingIds.data.forEach((headingId: string) => { undoOperations.push({ action: "move", id: headingId, - previousID, + previousID: id, parentID, }); + }) + headingIds.data.reverse().forEach((headingId: string) => { doOperations.push({ action: "move", id: headingId,