Browse Source

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

Vanessa 3 years ago
parent
commit
1e6545d0b9
1 changed files with 2 additions and 0 deletions
  1. 2 0
      app/src/menus/protyle.ts

+ 2 - 0
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();
             });