From de670dfa8a39538f2ca2c2d61f1471da3cd8f429 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Wed, 13 Aug 2025 12:08:46 +0800 Subject: [PATCH] =?UTF-8?q?:art:=20=E6=95=B0=E6=8D=AE=E5=BA=93=E5=88=86?= =?UTF-8?q?=E7=BB=84=E5=88=92=E9=80=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/protyle/wysiwyg/index.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/src/protyle/wysiwyg/index.ts b/app/src/protyle/wysiwyg/index.ts index 50770d415..79613df98 100644 --- a/app/src/protyle/wysiwyg/index.ts +++ b/app/src/protyle/wysiwyg/index.ts @@ -810,6 +810,7 @@ export class WYSIWYG { let lastCellElement: HTMLElement; const nodeRect = nodeElement.getBoundingClientRect(); const scrollElement = nodeElement.querySelector(".av__scroll"); + const bodyElement = hasClosestByClassName(avCellElement, "av__body") as HTMLElement; documentSelf.onmousemove = (moveEvent: MouseEvent) => { const tempCellElement = hasClosestByClassName(moveEvent.target as HTMLElement, "av__cell") as HTMLElement; if (scrollElement.scrollWidth > scrollElement.clientWidth + 2) { @@ -824,7 +825,8 @@ export class WYSIWYG { protyle.contentElement.scrollTop += 5; } } - if (moveSelectCellElement && tempCellElement && tempCellElement === moveSelectCellElement) { + if (bodyElement !== hasClosestByClassName(tempCellElement, "av__body") || + (moveSelectCellElement && tempCellElement && tempCellElement === moveSelectCellElement)) { return; } if (tempCellElement && tempCellElement.dataset.id && (event.clientX !== moveEvent.clientX || event.clientY !== moveEvent.clientY)) { @@ -832,7 +834,7 @@ export class WYSIWYG { nodeElement.querySelectorAll(".av__cell--active").forEach((item: HTMLElement) => { item.classList.remove("av__cell--active"); }); - nodeElement.querySelectorAll(".av__row").forEach((rowElement: HTMLElement, index: number) => { + bodyElement.querySelectorAll(".av__row").forEach((rowElement: HTMLElement, index: number) => { if (index >= Math.min(originIndex.rowIndex, newIndex.rowIndex) && index <= Math.max(originIndex.rowIndex, newIndex.rowIndex)) { rowElement.querySelectorAll(".av__cell").forEach((cellElement: HTMLElement, cellIndex: number) => { if (cellIndex >= Math.min(originIndex.celIndex, newIndex.celIndex) && cellIndex <= Math.max(originIndex.celIndex, newIndex.celIndex)) {