From fbf9ee09bbaa571e8dd047b119c1dcf78995b1e4 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Sat, 12 Nov 2022 00:22:47 +0800 Subject: [PATCH] :bug: fix https://github.com/siyuan-note/siyuan/issues/6552 --- app/src/layout/dock/Files.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/src/layout/dock/Files.ts b/app/src/layout/dock/Files.ts index b31ec5913..393be5830 100644 --- a/app/src/layout/dock/Files.ts +++ b/app/src/layout/dock/Files.ts @@ -343,7 +343,7 @@ export class Files extends Model { return; } const liElement = hasClosestByTag(event.target, "LI"); - if (!liElement || !window.siyuan.dragElement || liElement.classList.contains("b3-list-item--focus")) { + if (!liElement || !window.siyuan.dragElement) { event.preventDefault(); return; } @@ -356,6 +356,10 @@ export class Files extends Model { event.preventDefault(); return; } + // 允许标题拖拽到文档树的选中文档上 https://github.com/siyuan-note/siyuan/issues/6552 + if (liElement.classList.contains("b3-list-item--focus")) { + return; + } let sourceOnlyRoot = true; Array.from(this.element.querySelectorAll(".b3-list-item--focus")).find((item: HTMLElement) => { if (item.getAttribute("data-type") === "navigation-file") {