From dec1edd0deda395a7bccf6ef55921ebd7f37ac99 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Wed, 9 Jul 2025 16:27:23 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/issues/11102 --- app/src/protyle/util/editorCommonEvent.ts | 4 +++- app/src/protyle/wysiwyg/transaction.ts | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/src/protyle/util/editorCommonEvent.ts b/app/src/protyle/util/editorCommonEvent.ts index 6b574500a..37c1e559c 100644 --- a/app/src/protyle/util/editorCommonEvent.ts +++ b/app/src/protyle/util/editorCommonEvent.ts @@ -928,7 +928,8 @@ export const dropEvent = (protyle: IProtyle, editorElement: HTMLElement) => { avID, blockID, id, - previousID: window.siyuan.dragElement.previousElementSibling?.getAttribute("data-id") + previousID: window.siyuan.dragElement.previousElementSibling?.getAttribute("data-id"), + data: "unRefresh" // 不需要重新渲染 }], [{ action: "sortAttrViewView", avID, @@ -1741,6 +1742,7 @@ export const dropEvent = (protyle: IProtyle, editorElement: HTMLElement) => { if (window.siyuan.dragElement) { window.siyuan.dragElement.style.opacity = ""; window.siyuan.dragElement = undefined; + document.onmousemove = null; } }); }; diff --git a/app/src/protyle/wysiwyg/transaction.ts b/app/src/protyle/wysiwyg/transaction.ts index 8bd7d4e6d..f5657ddb9 100644 --- a/app/src/protyle/wysiwyg/transaction.ts +++ b/app/src/protyle/wysiwyg/transaction.ts @@ -856,7 +856,7 @@ export const onTransaction = (protyle: IProtyle, operation: IOperation, isUndo: "duplicateAttrViewKey", "setAttrViewViewDesc", "setAttrViewCoverFrom", "setAttrViewCoverFromAssetKeyID", "setAttrViewBlockView", "setAttrViewCardSize", "setAttrViewCardAspectRatio", "hideAttrViewName", "setAttrViewShowIcon", "setAttrViewWrapField", "setAttrViewGroup"].includes(operation.action)) { - if (!isUndo) { + if (!isUndo && operation.data !== "unRefresh") { // 撤销 transaction 会进行推送,需使用推送来进行刷新最新数据 https://github.com/siyuan-note/siyuan/issues/13607 refreshAV(protyle, operation); } else if (operation.action === "setAttrViewName") {