瀏覽代碼

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

Vanessa 3 年之前
父節點
當前提交
1e6545d0b9
共有 1 個文件被更改,包括 2 次插入0 次删除
  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();
             });