修复移动端软键盘页面弹跳黑底

移除 H5 软键盘打开时平台壳全局 transform 位移,避免浏览器原生避让后再次弹跳。

保留键盘打开状态、底部 dock 隐藏和浅色根背景兜底,避免短表单露出黑色宿主底色。

补充小程序 web-view 原生 page 浅色背景和对应样式测试。

更新统一创作页与平台键盘适配文档,沉淀不再全局上移平台壳的约束。
This commit is contained in:
2026-06-07 18:17:23 +08:00
parent 56a9075582
commit 665f09f047
11 changed files with 304 additions and 115 deletions

View File

@@ -79,17 +79,19 @@ body {
-webkit-font-smoothing: antialiased;
}
html[data-mobile-keyboard-open='true'],
html[data-mobile-keyboard-open='true'] body,
html[data-mobile-keyboard-open='true'] #root {
background: var(
--platform-keyboard-exposed-fill,
linear-gradient(180deg, #fffdf9 0%, #fdf9f5 54%, #f8efe7 100%)
);
}
.platform-viewport-shell {
height: var(--platform-layout-viewport-height, 100vh);
max-height: var(--platform-layout-viewport-height, 100vh);
min-height: var(--platform-layout-viewport-height, 100vh);
transform: translate3d(
0,
calc(-1 * var(--platform-keyboard-focus-offset, 0px)),
0
);
transform-origin: top center;
transition: transform 180ms ease;
}
@supports (height: 100dvh) {