Skip to content

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

:bug: Update table controls after cell editing https://github.com/siyuan-note/siyuan/issues/18564

Daniel009fd22a863e
diff --git a/app/src/protyle/util/tableControl.ts b/app/src/protyle/util/tableControl.ts
index aa519ed564..132b666eff 100644
--- a/app/src/protyle/util/tableControl.ts
+++ b/app/src/protyle/util/tableControl.ts
@@ -460,6 +460,11 @@ export class TableControl {
this.scheduleRender();
}
}, {signal});
+ this.wysiwygElement.addEventListener("input", () => {
+ if (this.caretCell?.isConnected || this.selection?.table.isConnected) {
+ this.scheduleRender();
+ }
+ }, {signal});
this.wysiwygElement.addEventListener("pointermove", event => this.handleTablePointerMove(event, false), {signal});
// 手柄和添加按钮(pointer-events: auto)会截获鼠标事件,导致 wysiwygElement 收不到
// pointermove,边缘 hover 检测被卡住(例如鼠标停在 cell 手柄上时无法触发 add-column)。