Ver Fonte

:iphone: 键盘收起

Vanessa há 2 anos atrás
pai
commit
fbf1b632ee

+ 2 - 0
app/src/mobile/util/showKeyboardToolbar.ts

@@ -85,8 +85,10 @@ export const initKeyboardToolbar = () => {
         }
         }
         if (type === "outdent") {
         if (type === "outdent") {
             listOutdent(protyle, [nodeElement.parentElement], range);
             listOutdent(protyle, [nodeElement.parentElement], range);
+            focusByRange(range);
         } else if (type === "indent") {
         } else if (type === "indent") {
             listIndent(protyle, [nodeElement.parentElement], range);
             listIndent(protyle, [nodeElement.parentElement], range);
+            focusByRange(range);
         }
         }
     });
     });
 };
 };

+ 3 - 0
app/src/protyle/toolbar/index.ts

@@ -621,6 +621,9 @@ export class Toolbar {
         if (wbrElement) {
         if (wbrElement) {
             wbrElement.remove();
             wbrElement.remove();
         }
         }
+        if (isMobile()) {
+            focusByRange(this.range);
+        }
     }
     }
 
 
     public showFileAnnotationRef(protyle: IProtyle, refElement: HTMLElement) {
     public showFileAnnotationRef(protyle: IProtyle, refElement: HTMLElement) {