diff --git a/app/src/protyle/render/av/action.ts b/app/src/protyle/render/av/action.ts index d9cbf487c..6bdce785e 100644 --- a/app/src/protyle/render/av/action.ts +++ b/app/src/protyle/render/av/action.ts @@ -101,11 +101,10 @@ export const avContextmenu = (protyle: IProtyle, event: MouseEvent & { detail: a click() { transaction(protyle, [{ action: "removeAttrViewBlock", - id: blockElement.getAttribute("data-node-id"), + srcIDs: [rowId], parentID: blockElement.getAttribute("data-av-id"), }], [{ action: "insertAttrViewBlock", - id: blockElement.getAttribute("data-node-id"), parentID: blockElement.getAttribute("data-av-id"), previousID: rowElement.previousElementSibling?.getAttribute("data-id") || "", srcIDs: [rowId], diff --git a/app/src/protyle/util/editorCommonEvent.ts b/app/src/protyle/util/editorCommonEvent.ts index 36afc44d8..95882878d 100644 --- a/app/src/protyle/util/editorCommonEvent.ts +++ b/app/src/protyle/util/editorCommonEvent.ts @@ -804,13 +804,12 @@ export const dropEvent = (protyle: IProtyle, editorElement: HTMLElement) => { } transaction(protyle, [{ action: "insertAttrViewBlock", - id: blockElement.getAttribute("data-node-id"), parentID: blockElement.getAttribute("data-av-id"), previousID, srcIDs: sourceIds, }], [{ action: "removeAttrViewBlock", - id: targetElement.getAttribute("data-node-id"), + srcIDs: sourceIds, parentID: targetElement.getAttribute("data-av-id"), }]); }