Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: 移动端键盘弹起后光标定位居中 https://github.com/siyuan-note/siyuan/issues/6074

Liang Ding1d9bd070d18f
diff --git a/app/src/mobile/util/showKeyboardToolbar.ts b/app/src/mobile/util/showKeyboardToolbar.ts
index 76017c38d5..f8fbbac436 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 = () => {