Преглед изворни кода

:bug: 链接菜单中移除锚文本后无法撤销

Vanessa пре 3 година
родитељ
комит
658c37646d
1 измењених фајлова са 1 додато и 2 уклоњено
  1. 1 2
      app/src/menus/protyle.ts

+ 1 - 2
app/src/menus/protyle.ts

@@ -627,8 +627,7 @@ export const linkMenu = (protyle: IProtyle, linkElement: HTMLElement, focusText
             inputElement.value = linkElement.textContent.replace(Constants.ZWSP, "");
             inputElement.addEventListener("change", () => {
                 if (!inputElement.value) {
-                    protyle.toolbar.setInlineMark(protyle, "link", "remove");
-                    window.siyuan.menus.menu.remove();
+                    linkElement.remove();
                 }
                 updateTransaction(protyle, id, nodeElement.outerHTML, html);
                 html = nodeElement.outerHTML;