From 12c5abc15717478a44cc7530be9a80ca4fc4e3a9 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Wed, 16 Aug 2023 23:18:07 +0800 Subject: [PATCH] :art: fix https://github.com/siyuan-note/siyuan/issues/8950 --- app/src/mobile/util/keyboardToolbar.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/mobile/util/keyboardToolbar.ts b/app/src/mobile/util/keyboardToolbar.ts index 8e0bde693..f0f9d013e 100644 --- a/app/src/mobile/util/keyboardToolbar.ts +++ b/app/src/mobile/util/keyboardToolbar.ts @@ -404,11 +404,11 @@ export const showKeyboardToolbar = () => { const contentElement = hasClosestByClassName(range.startContainer, "protyle-content", true); if (contentElement) { const cursorTop = getSelectionPosition(contentElement).top - contentElement.getBoundingClientRect().top; - if (cursorTop < window.innerHeight - 96) { + if (cursorTop < window.innerHeight - 118.5) { // 118: contentElement.getBoundingClientRect().top + toolbarElement.clientHeight return; } contentElement.scroll({ - top: contentElement.scrollTop + cursorTop - ((window.outerHeight - 65) / 2 - 30), + top: contentElement.scrollTop + cursorTop - ((window.outerHeight - 118.5) / 2 - 26), left: contentElement.scrollLeft, behavior: "smooth" });