From fbf1b632ee0264f06e84f7acd61e884a6a0b3735 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Thu, 6 Oct 2022 22:38:12 +0800 Subject: [PATCH] =?UTF-8?q?:iphone:=20=E9=94=AE=E7=9B=98=E6=94=B6=E8=B5=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/mobile/util/showKeyboardToolbar.ts | 2 ++ app/src/protyle/toolbar/index.ts | 3 +++ 2 files changed, 5 insertions(+) diff --git a/app/src/mobile/util/showKeyboardToolbar.ts b/app/src/mobile/util/showKeyboardToolbar.ts index 78fd2adbb..6f0c4db21 100644 --- a/app/src/mobile/util/showKeyboardToolbar.ts +++ b/app/src/mobile/util/showKeyboardToolbar.ts @@ -85,8 +85,10 @@ export const initKeyboardToolbar = () => { } if (type === "outdent") { listOutdent(protyle, [nodeElement.parentElement], range); + focusByRange(range); } else if (type === "indent") { listIndent(protyle, [nodeElement.parentElement], range); + focusByRange(range); } }); }; diff --git a/app/src/protyle/toolbar/index.ts b/app/src/protyle/toolbar/index.ts index 295491109..cb1ea3eba 100644 --- a/app/src/protyle/toolbar/index.ts +++ b/app/src/protyle/toolbar/index.ts @@ -621,6 +621,9 @@ export class Toolbar { if (wbrElement) { wbrElement.remove(); } + if (isMobile()) { + focusByRange(this.range); + } } public showFileAnnotationRef(protyle: IProtyle, refElement: HTMLElement) {