游玩页改成固定画布,移动端不再整页可滚
- PlatformEntryActiveFlowShell 在 game-play 舞台给页签容器加 platform-tab-panel--game-play,不再挂 overflow-auto,也不再叠加双份内边距 - index.css 新增 .platform-tab-panel--game-play,面板 overflow:hidden 并去掉右侧留白 - gameDistribution.css 让 .game-play-page 改 height:100%/min-height:0、播放器 flex:1 1 auto/min-height:0,删除移动端把页面撑高的 calc(100dvh - 8rem) - 矮视口(max-height:26rem,横屏手机)压扁启动面板并隐藏封面,保证「开始游戏」可达,页面与面板本身仍不滚动 - PlatformEntryActiveFlowShell.test.tsx 双向锁定游玩舞台页签容器不滚动、游戏广场等舞台仍保持滚动 - check-game-distribution-web-e2e.mjs 移动端段新增「移动端游玩页不可滚动(面板与整页都不溢出)」断言 - 里程碑文档补上该修复的根因、口径与验证记录
This commit is contained in:
@@ -522,6 +522,23 @@ async function main() {
|
||||
mobileStartDisabled && rotationHint,
|
||||
`startDisabled=${mobileStartDisabled} rotationHint=${rotationHint}`,
|
||||
);
|
||||
// 游玩页是固定画布:面板必须是 overflow:hidden 且不溢出,整页也不能出现滚动条。
|
||||
const playScroll = await mobilePage.evaluate(() => {
|
||||
const panel = document.querySelector('.platform-tab-panel');
|
||||
return {
|
||||
documentOverflow:
|
||||
document.documentElement.scrollHeight - window.innerHeight,
|
||||
panelOverflow: panel ? panel.scrollHeight - panel.clientHeight : 0,
|
||||
panelOverflowY: panel ? getComputedStyle(panel).overflowY : 'missing',
|
||||
};
|
||||
});
|
||||
check(
|
||||
'移动端游玩页不可滚动(面板与整页都不溢出)',
|
||||
playScroll.documentOverflow <= 1 &&
|
||||
playScroll.panelOverflow <= 1 &&
|
||||
playScroll.panelOverflowY === 'hidden',
|
||||
JSON.stringify(playScroll),
|
||||
);
|
||||
await mobile.close();
|
||||
await context.close();
|
||||
} finally {
|
||||
|
||||
Reference in New Issue
Block a user