根因: Tauri targetSdk 37 强制 edge-to-edge, MainActivity 不处理 IME Insets, 系统不再因键盘缩小窗口, 清单 adjustResize 失效, 键盘直接盖住 WebView。 - 新增 scripts/ci/android-softinput.sh: init 后注入 windowSoftInputMode=adjustResize, 并重写 MainActivity.kt 监听 IME Insets, 键盘可见时把高度加到内容容器底部 (API 30+), 让 WebView 真正变矮, 所有 bottom 弹层自动上移 - CI (android-build.yml) 与本地 build-apk.sh 在 init 之后、build 之前调用该脚本 (幂等) - 新增全局 useKeepInputVisible: 输入框聚焦后用 scroll-into-view-if-needed 滚入可视区, 覆盖页面滚动与 Popup 内部滚动 - 弹层补 max-height + 内部滚动, 防止键盘弹出后顶部被顶出屏幕 - calibrateSafeTop 在键盘弹出时保留旧值, 避免误判导致整页跳动
This commit is contained in:
@@ -706,6 +706,21 @@ body.me-safe-top .app-safe-top { height: 0; }
|
||||
flex: 1; border: 1px solid var(--color-border); border-radius: 6px; padding: 6px 8px;
|
||||
}
|
||||
|
||||
/* ----- 软键盘避让 (Android) -----
|
||||
原生层把键盘高度从 WebView 里扣掉后, 可视高度会变小;
|
||||
弹层内容超过剩余高度时改为内部滚动, 避免顶部/输入框被顶出屏幕。 */
|
||||
.adm-popup-body {
|
||||
max-height: 100vh;
|
||||
max-height: 100dvh;
|
||||
overflow-y: auto;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
.adm-dialog-body {
|
||||
max-height: calc(100vh - 48px);
|
||||
max-height: calc(100dvh - 48px);
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
/* ----- 表单弹窗 (打卡项 / 清单) ----- */
|
||||
.form-popup { padding: 16px 16px 8px; }
|
||||
.form-title { font-size: 16px; font-weight: 700; color: var(--color-text); margin-bottom: 12px; }
|
||||
|
||||
Reference in New Issue
Block a user