From 1d9bd070d18fa42d99850e9e08add84bc6d44072 Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Fri, 7 Oct 2022 19:59:11 +0800 Subject: [PATCH 1/2] =?UTF-8?q?:art:=20=E7=A7=BB=E5=8A=A8=E7=AB=AF?= =?UTF-8?q?=E9=94=AE=E7=9B=98=E5=BC=B9=E8=B5=B7=E5=90=8E=E5=85=89=E6=A0=87?= =?UTF-8?q?=E5=AE=9A=E4=BD=8D=E5=B1=85=E4=B8=AD=20https://github.com/siyua?= =?UTF-8?q?n-note/siyuan/issues/6074?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/mobile/util/showKeyboardToolbar.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/mobile/util/showKeyboardToolbar.ts b/app/src/mobile/util/showKeyboardToolbar.ts index 76017c38d..f8fbbac43 100644 --- a/app/src/mobile/util/showKeyboardToolbar.ts +++ b/app/src/mobile/util/showKeyboardToolbar.ts @@ -18,7 +18,10 @@ export const showKeyboardToolbar = (bottom = 0) => { !window.siyuan.mobileEditor.protyle.wysiwyg.element.contains(range.startContainer)) { return; } - scrollCenter(window.siyuan.mobileEditor.protyle, undefined, false, (window.outerHeight - 65) / 2 - 30); + + setTimeout(() => { + scrollCenter(window.siyuan.mobileEditor.protyle, undefined, false, (window.outerHeight - 65) / 2 - 30); + }, 100); }; export const hideKeyboardToolbar = () => { From e2ea21a4eb85c3ce35669ca93d3d839d876347b8 Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Fri, 7 Oct 2022 20:00:00 +0800 Subject: [PATCH 2/2] =?UTF-8?q?:art:=20=E7=A7=BB=E5=8A=A8=E7=AB=AF?= =?UTF-8?q?=E9=94=AE=E7=9B=98=E5=BC=B9=E8=B5=B7=E5=90=8E=E5=85=89=E6=A0=87?= =?UTF-8?q?=E5=AE=9A=E4=BD=8D=E5=B1=85=E4=B8=AD=20https://github.com/siyua?= =?UTF-8?q?n-note/siyuan/issues/6074?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/mobile/util/showKeyboardToolbar.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/mobile/util/showKeyboardToolbar.ts b/app/src/mobile/util/showKeyboardToolbar.ts index f8fbbac43..622ceccca 100644 --- a/app/src/mobile/util/showKeyboardToolbar.ts +++ b/app/src/mobile/util/showKeyboardToolbar.ts @@ -19,7 +19,7 @@ export const showKeyboardToolbar = (bottom = 0) => { return; } - setTimeout(() => { + setTimeout(() => { // Android 端事件需要滞后一些,所以这里统一延迟一下 scrollCenter(window.siyuan.mobileEditor.protyle, undefined, false, (window.outerHeight - 65) / 2 - 30); }, 100); };