From e502c53c7dd87564759be8649522158bec8b6271 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Tue, 10 Feb 2026 17:03:42 +0800 Subject: [PATCH] =?UTF-8?q?:iphone:=20=E8=BE=93=E5=85=A5=E6=A1=86=E5=88=A4?= =?UTF-8?q?=E6=96=AD=E6=94=B9=E8=BF=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/mobile/index.ts | 3 +++ app/stage/auth.html | 14 ++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/app/src/mobile/index.ts b/app/src/mobile/index.ts index facdb0abe..4dae3daf1 100644 --- a/app/src/mobile/index.ts +++ b/app/src/mobile/index.ts @@ -104,6 +104,9 @@ class App { (event.target.tagName === "INPUT" && ["email", "number", "password", "search", "tel", "text", "url", ""].includes(event.target.getAttribute("type")))) && event.target.getAttribute("readonly") !== "readonly") { editElement = event.target; + setTimeout(() => { + editElement.scrollIntoView(); + }, Constants.TIMEOUT_TRANSITION); } else if (wysisygElement && wysisygElement.getAttribute("data-readonly") === "false") { editElement = hasClosestByAttribute(event.target, "contenteditable", "true") as HTMLElement; } diff --git a/app/stage/auth.html b/app/stage/auth.html index 8d5d50941..403ca5ca3 100644 --- a/app/stage/auth.html +++ b/app/stage/auth.html @@ -574,6 +574,20 @@ new WebSocket((window.location.protocol === 'https:' ? 'wss' : 'ws') + '://' + window.location.host + '/ws?app=siyuan&id=auth') } init(); + window.addEventListener("click", (event) => { + if (event.target.tagName === "INPUT" && + ["email", "number", "password", "search", "tel", "text", "url", ""].includes(event.target.getAttribute("type")) && + event.target.getAttribute("readonly") !== "readonly") { + setTimeout(() => { + event.target.scrollIntoView(); + }, Constants.TIMEOUT_TRANSITION); + if (window.JSAndroid && window.JSAndroid.showKeyboard) { + window.JSAndroid.showKeyboard(); + } else if (window.JSHarmony && window.JSHarmony.showKeyboard) { + window.JSHarmony.showKeyboard(); + } + } + })