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: Hide the mindmap IME input box during composition https://github.com/siyuan-note/siyuan/issues/21045
Danielecbb3f4ce132
diff --git a/app/src/assets/scss/protyle/_mindmap-view.scss b/app/src/assets/scss/protyle/_mindmap-view.scssindex ac8d3926a1..c1e7372f74 100644--- a/app/src/assets/scss/protyle/_mindmap-view.scss+++ b/app/src/assets/scss/protyle/_mindmap-view.scss@@ -59,10 +59,6 @@overflow-wrap: anywhere;pointer-events: none;opacity: 0;-- &--composing {- opacity: 1;- }}&--nested {diff --git a/app/src/protyle/render/listMindmap/model.test.ts b/app/src/protyle/render/listMindmap/model.test.tsindex 1f16c665ff..f6002b9e21 100644--- a/app/src/protyle/render/listMindmap/model.test.ts+++ b/app/src/protyle/render/listMindmap/model.test.ts@@ -2083,7 +2083,7 @@ const browserCases = async (sourceCode: string, css: string, taskSource: string,check.equal(document.activeElement, selectionInput, "composition retains its original input target");check.equal(edits.length, beforeIME, "uncommitted phonetic text does not replace node content");check.equal(selectionInput.textContent, "ni");- check.equal(getComputedStyle(selectionInput).opacity, "1", "composition preview is visible");+ check.equal(getComputedStyle(selectionInput).opacity, "0", "composition does not expose an extra input box over the node");const confirmation = new KeyboardEvent("keydown", {key: "Enter", keyCode: 229, bubbles: true, cancelable: true});selectionInput.dispatchEvent(confirmation);check.equal(confirmation.defaultPrevented, false, "IME confirmation is not a node shortcut");diff --git a/app/src/protyle/render/listMindmap/view.ts b/app/src/protyle/render/listMindmap/view.tsindex ee2b583272..75c547d017 100644--- a/app/src/protyle/render/listMindmap/view.ts+++ b/app/src/protyle/render/listMindmap/view.ts@@ -293,7 +293,6 @@ export class ListMindmapView {this.listen(this.selectionInput, "compositionstart", () => {this.selectionComposing = true;this.selectionCompositionRevision = this.selectionInputRevision;- this.selectionInput.classList.add("mindmap-view__selection-input--composing");});this.listen(this.selectionInput, "compositionend", () => {this.selectionComposing = false;@@ -1272,7 +1271,6 @@ export class ListMindmapView {this.selectionInput.textContent = "";this.selectionComposing = false;this.selectionCompositionEnding = false;- this.selectionInput.classList.remove("mindmap-view__selection-input--composing");}this.selectionInput.hidden = !id;const position = this.positions.get(id);@@ -1296,7 +1294,6 @@ export class ListMindmapView {}private commitSelectionInput() {- this.selectionInput.classList.remove("mindmap-view__selection-input--composing");const id = this.selectionInputId;const revision = this.selectionInputRevision;if (!id || this.selectionComposing || this.selectionCompositionEnding || !this.selectionInput.textContent) {