From 60e2b51763ac92ed9411291e2365b19a07317093 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Wed, 3 Apr 2024 21:32:00 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/issues/10828 --- app/src/layout/dock/Outline.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/layout/dock/Outline.ts b/app/src/layout/dock/Outline.ts index bf34eec9e..4e3f636c4 100644 --- a/app/src/layout/dock/Outline.ts +++ b/app/src/layout/dock/Outline.ts @@ -237,7 +237,7 @@ export class Outline extends Model { let ghostElement: HTMLElement; let selectItem: HTMLElement; documentSelf.onmousemove = (moveEvent: MouseEvent) => { - if (moveEvent.clientY === event.clientY && moveEvent.clientX === event.clientX) { + if (moveEvent.clientY === event.clientY && moveEvent.clientX === event.clientX || this.element.getAttribute("data-loading") === "true") { return; } moveEvent.preventDefault(); @@ -310,6 +310,7 @@ export class Outline extends Model { previousID = selectItem.getAttribute("data-node-id"); selectItem.after(item); } + this.element.setAttribute("data-loading", "true"); transaction(editItem.editor.protyle, [{ action: "moveOutlineHeading", id: item.dataset.nodeId, @@ -469,5 +470,6 @@ export class Outline extends Model { currentElement.classList.add("b3-list-item--focus"); } } + this.element.removeAttribute("data-loading") } }