Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:bug: Hide table resize handles when edited cell widths change https://github.com/siyuan-note/siyuan/issues/19789

Daniel72c4808078ae
diff --git a/app/src/boot/globalEvent/mousemove.ts b/app/src/boot/globalEvent/mousemove.ts
index 51a8c6441b..7f750be631 100644
--- a/app/src/boot/globalEvent/mousemove.ts
+++ b/app/src/boot/globalEvent/mousemove.ts
@@ -290,6 +290,8 @@ export const windowMouseMove = (event: MouseEvent) => {
resizeElement.setAttribute("data-col-index", (getColIndex(cellElement) - 1).toString());
resizeElement.setAttribute("data-left", (cellElement.offsetLeft - 3).toString());
resizeElement.setAttribute("style", `top:${resizeBounds.top}px;height:${resizeBounds.height}px;left: ${Math.round(cellElement.offsetLeft - blockElement.firstElementChild.scrollLeft - 3)}px;display:block`);
+ } else {
+ resizeElement.setAttribute("style", "display:none");
}
}
}
diff --git a/app/src/protyle/wysiwyg/index.ts b/app/src/protyle/wysiwyg/index.ts
index fcf2195a03..ddc6786594 100644
--- a/app/src/protyle/wysiwyg/index.ts
+++ b/app/src/protyle/wysiwyg/index.ts
@@ -4379,9 +4379,7 @@ export class WYSIWYG {
return;
}
// 输入可能改变列宽,隐藏已有调整线,待鼠标重新命中列边界后定位。
- if (blockElement.classList.contains("table")) {
- blockElement.querySelector(".table__resize")?.removeAttribute("style");
- }
+ blockElement.closest(".table")?.querySelector(".table__resize")?.setAttribute("style", "display:none");
if ([":", "(", "【", "(", "[", "{", "「", "『", "#", "/", "、"].includes(event.data)) {
protyle.hint.enableExtend = true;
}