Skip to content

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

:art: https://github.com/siyuan-note/siyuan/issues/17024

Vanessae392e2b521a9
diff --git a/app/src/protyle/toolbar/index.ts b/app/src/protyle/toolbar/index.ts
index a1ba01173e..61341f3736 100644
--- a/app/src/protyle/toolbar/index.ts
+++ b/app/src/protyle/toolbar/index.ts
@@ -1103,7 +1103,6 @@ export class Toolbar {
}
});
this.subElementCloseCB = () => {
- protyle.wysiwyg.element.focus({ preventScroll: true});
if (!renderElement.parentElement || protyle.disabled ||
(oldTextValue === textElement.value && textElement.value)) {
if (renderElement.tagName === "SPAN") {
@@ -1116,6 +1115,7 @@ export class Toolbar {
focusBlock(renderElement);
renderElement.classList.add("protyle-wysiwyg--select");
}
+ protyle.wysiwyg.element.focus({ preventScroll: true});
return;
}
let inlineLastNode: Element;
@@ -1221,6 +1221,7 @@ export class Toolbar {
}
}
updateTransaction(protyle, id, nodeElement.outerHTML, html);
+ protyle.wysiwyg.element.focus({ preventScroll: true});
};
this.subElement.style.zIndex = (++window.siyuan.zIndex).toString();
this.subElement.classList.remove("fn__none");