An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:bug: fix https://github.com/siyuan-note/insider/issues/1114
Vanessa81ae9a22cd05
diff --git a/app/src/protyle/render/av/col.ts b/app/src/protyle/render/av/col.tsindex 1a2bf077eb..24e7945c4d 100644--- a/app/src/protyle/render/av/col.ts+++ b/app/src/protyle/render/av/col.ts@@ -135,7 +135,7 @@ ${html}export const bindEditEvent = (options: { protyle: IProtyle, data: IAV, menuElement: HTMLElement }) => {const avID = options.data.id;- const colId = options.menuElement.firstElementChild.getAttribute("data-col-id");+ const colId = options.menuElement.querySelector(".b3-menu__item").getAttribute("data-col-id");const colData = options.data.view.columns.find((item: IAVColumn) => item.id === colId);const nameElement = options.menuElement.querySelector('[data-type="name"]') as HTMLInputElement;nameElement.addEventListener("blur", () => {@@ -164,6 +164,9 @@ export const bindEditEvent = (options: { protyle: IProtyle, data: IAV, menuEleme}if (event.key === "Escape") {options.menuElement.parentElement.remove();+ } else if (event.key === "Enter") {+ nameElement.dispatchEvent(new CustomEvent("blur"));+ options.menuElement.parentElement.remove();}});const addOptionElement = options.menuElement.querySelector('[data-type="addOption"]') as HTMLInputElement;diff --git a/app/src/protyle/render/av/select.ts b/app/src/protyle/render/av/select.tsindex 0740e626a8..2f9cd6dcb8 100644--- a/app/src/protyle/render/av/select.ts+++ b/app/src/protyle/render/av/select.ts@@ -101,7 +101,7 @@ export const setColOption = (protyle: IProtyle, data: IAV, target: HTMLElement,if (!menuElement) {return;}- const colId = cellElements ? cellElements[0].dataset.colId : menuElement.firstElementChild.getAttribute("data-col-id");+ const colId = cellElements ? cellElements[0].dataset.colId : menuElement.querySelector(".b3-menu__item").getAttribute("data-col-id");let name = target.parentElement.dataset.name;let color = target.parentElement.dataset.color;const menu = new Menu("av-col-option", () => {@@ -169,7 +169,17 @@ export const setColOption = (protyle: IProtyle, data: IAV, target: HTMLElement,}menu.addItem({iconHTML: "",- label: `<input class="b3-text-field" style="margin: 4px 0" value="${name}">`+ label: `<input class="b3-text-field" style="margin: 4px 0" value="${name}">`,+ bind(element) {+ element.querySelector("input").addEventListener("keydown", (event: KeyboardEvent) => {+ if (event.isComposing) {+ return;+ }+ if (event.key === "Enter") {+ menu.close();+ }+ });+ }});menu.addItem({label: window.siyuan.languages.delete,