Lock scrolling on the play screen (incl. iOS Safari)

- Fix body to the viewport (position: fixed) and fit the whole table screen
  to the screen height; overflow: hidden alone does not stop iOS scrolling
- Cancel one-finger touchmove to stop iOS rubber-band scrolling
  (range slider and an overflowing action bar are exempt; pinch zoom kept)
- touch-action: manipulation to stop double-tap zoom
- Compact layout for short screens (iPhone SE size) and 7+ players

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
agomizi1cmandClaude Opus 5.5 committed 2026-10-15 18:59:41 +09:00
1 parent b5d84e5f65
commit e22043f9db
2 files changed
+70 -7

No files matched your search

+16
View File
@@ -504,5 +504,21 @@
toast('サイトのリンクをコピーしました');
});
// iOS Safari は CSS だけではページのスクロール・引っ張り(バウンス)を止められないので、
// 1本指のドラッグを止める。スライダーと、中身がはみ出している操作エリアは除く。
// 2本指(ピンチ拡大)はアクセシビリティのため止めない。
document.addEventListener(
'touchmove',
(e) => {
if (e.touches.length !== 1) return;
const t = e.target;
if (t.closest && t.closest('input[type="range"]')) return;
const bar = t.closest && t.closest('.action-bar');
if (bar && bar.scrollHeight > bar.clientHeight) return;
if (e.cancelable) e.preventDefault();
},
{ passive: false }
);
ensureName();
})();