Skip to content

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

:art: fix https://github.com/siyuan-note/siyuan/issues/5036

Vanessa1e6545d0b9e8
diff --git a/app/src/menus/protyle.ts b/app/src/menus/protyle.ts
index fb35844ce9..4d7ba87eb6 100644
--- a/app/src/menus/protyle.ts
+++ b/app/src/menus/protyle.ts
@@ -53,6 +53,8 @@ export const refMenu = (protyle: IProtyle, element: HTMLElement) => {
element.setAttribute("data-subtype", inputElement.value ? "s" : "d");
updateTransaction(protyle, id, nodeElement.outerHTML, oldHTML);
}
+ protyle.toolbar.range.selectNodeContents(element);
+ protyle.toolbar.range.collapse(false);
focusByRange(protyle.toolbar.range);
event.stopPropagation();
});