From 28f1bc782bf992047d6c1932e617b083f88c0bcc Mon Sep 17 00:00:00 2001 From: Vanessa Date: Sat, 7 Feb 2026 10:45:28 +0800 Subject: [PATCH] =?UTF-8?q?:iphone:=20=E7=BC=96=E8=BE=91=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=BA=93=E5=8D=95=E5=85=83=E6=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/mobile/util/keyboardToolbar.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/app/src/mobile/util/keyboardToolbar.ts b/app/src/mobile/util/keyboardToolbar.ts index 5dafa1928..d8e33e8ce 100644 --- a/app/src/mobile/util/keyboardToolbar.ts +++ b/app/src/mobile/util/keyboardToolbar.ts @@ -609,9 +609,13 @@ export const initKeyboardToolbar = () => { const range = getSelection().getRangeAt(0); if (type === "done") { if (toolbarElement.clientHeight > 100) { + if (isInHarmony() || isInAndroid()) { + setTimeout(() => focusByRange(range), Constants.TIMEOUT_TRANSITION); + } else { + focusByRange(range); + } hideKeyboardToolbarUtil(); callMobileAppShowKeyboard(); - setTimeout(() => focusByRange(range), 256); } else { activeBlur(); } @@ -692,9 +696,13 @@ export const initKeyboardToolbar = () => { return; } else if (type === "add") { if (buttonElement.classList.contains("protyle-toolbar__item--current")) { + if (isInHarmony() || isInAndroid()) { + setTimeout(() => focusByRange(range), Constants.TIMEOUT_TRANSITION); + } else { + focusByRange(range); + } hideKeyboardToolbarUtil(); callMobileAppShowKeyboard(); - setTimeout(() => focusByRange(range), 256); } else { (document.activeElement as HTMLElement)?.blur(); buttonElement.classList.add("protyle-toolbar__item--current");