Ver código fonte

:bug: fix https://github.com/siyuan-note/siyuan/issues/6127

Vanessa 2 anos atrás
pai
commit
538aa0803a
1 arquivos alterados com 2 adições e 4 exclusões
  1. 2 4
      app/src/protyle/toolbar/index.ts

+ 2 - 4
app/src/protyle/toolbar/index.ts

@@ -329,7 +329,7 @@ export class Toolbar {
                     const types = item.getAttribute("data-type").split(" ");
                     const types = item.getAttribute("data-type").split(" ");
                     if (type === "clear") {
                     if (type === "clear") {
                         for (let i = 0; i < types.length; i++) {
                         for (let i = 0; i < types.length; i++) {
-                            if (["strong", "em", "u", "s", "mark", "sup", "sub"].includes(types[i])) {
+                            if (Constants.INLINE_TYPE.includes(types[i])) {
                                 types.splice(i, 1);
                                 types.splice(i, 1);
                                 i--;
                                 i--;
                             }
                             }
@@ -621,9 +621,7 @@ export class Toolbar {
         if (wbrElement) {
         if (wbrElement) {
             wbrElement.remove();
             wbrElement.remove();
         }
         }
-        if (isMobile()) {
-            focusByRange(this.range);
-        }
+        focusByRange(this.range);
     }
     }
 
 
     public showFileAnnotationRef(protyle: IProtyle, refElement: HTMLElement) {
     public showFileAnnotationRef(protyle: IProtyle, refElement: HTMLElement) {