From 1e6545d0b9e898ee55bb4b3c2235e2e36b768c8c Mon Sep 17 00:00:00 2001 From: Vanessa Date: Sat, 28 May 2022 20:29:02 +0800 Subject: [PATCH] :art: fix https://github.com/siyuan-note/siyuan/issues/5036 --- app/src/menus/protyle.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/menus/protyle.ts b/app/src/menus/protyle.ts index fb35844ce..4d7ba87eb 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(); });