修复移动端软键盘页面弹跳黑底
移除 H5 软键盘打开时平台壳全局 transform 位移,避免浏览器原生避让后再次弹跳。 保留键盘打开状态、底部 dock 隐藏和浅色根背景兜底,避免短表单露出黑色宿主底色。 补充小程序 web-view 原生 page 浅色背景和对应样式测试。 更新统一创作页与平台键盘适配文档,沉淀不再全局上移平台壳的约束。
This commit is contained in:
@@ -59,6 +59,30 @@ describe('index stylesheet unread dots', () => {
|
||||
expect(css).toContain('::-webkit-scrollbar-thumb');
|
||||
});
|
||||
|
||||
it('uses the platform fill for root background exposed by mobile keyboard shift', () => {
|
||||
const css = readIndexCss();
|
||||
|
||||
const keyboardRootBlock = getCssBlock(
|
||||
css,
|
||||
"html[data-mobile-keyboard-open='true'],\nhtml[data-mobile-keyboard-open='true'] body,\nhtml[data-mobile-keyboard-open='true'] #root",
|
||||
);
|
||||
expect(keyboardRootBlock).toContain('--platform-keyboard-exposed-fill');
|
||||
expect(keyboardRootBlock).toContain('#fffdf9');
|
||||
expect(keyboardRootBlock).not.toContain('#0a0a0a');
|
||||
});
|
||||
|
||||
it('does not globally transform the platform shell while the mobile keyboard is open', () => {
|
||||
const css = readIndexCss();
|
||||
|
||||
const platformShellBlock = getCssBlock(
|
||||
css,
|
||||
'.platform-viewport-shell {\n height',
|
||||
);
|
||||
expect(platformShellBlock).toContain('--platform-layout-viewport-height');
|
||||
expect(platformShellBlock).not.toContain('translate3d');
|
||||
expect(platformShellBlock).not.toContain('--platform-keyboard-focus-offset');
|
||||
});
|
||||
|
||||
it('uses warm brown tokens for draft unread markers instead of red literals', () => {
|
||||
const css = readIndexCss();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user