Both composers are position:sticky;bottom:0, which pins them to the bottom of the *layout* viewport. A phone keyboard does not shrink that viewport -- it only covers it -- so the first tap on the input left the box sitting behind the keyboard. Tapping back and focusing again appeared to work only because the page had been scrolled during the first attempt, so the browser's scroll-into-view landed somewhere else. Two engines, two halves: - Chromium honours interactive-widget=resizes-content on the viewport meta, which makes the layout viewport shrink when the keyboard opens, so 100dvh and sticky bottoms account for it on their own. - iOS Safari ignores that flag and only shrinks the visual viewport, so measure the covered height from visualViewport and publish it as --kb-inset; the composers offset their sticky bottom by it. On browsers that already resized the layout viewport the measurement is ~0, so the same rule is a no-op there instead of a double lift. The pages also gain a matching bottom margin so the last beat can still be scrolled clear of a lifted composer. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011BC7Dsg4gSQm3NLcZcG5SK
27 lines
1.0 KiB
HTML
27 lines
1.0 KiB
HTML
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
|
<!-- interactive-widget: shrink the layout viewport when the on-screen
|
|
keyboard opens, so the bottom-sticky composers stay above it instead
|
|
of staying pinned behind it. Chromium honours this; iOS Safari does
|
|
not, which is what src/keyboard.js covers. -->
|
|
<meta
|
|
name="viewport"
|
|
content="width=device-width, initial-scale=1.0, interactive-widget=resizes-content"
|
|
/>
|
|
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
|
<link
|
|
href="https://fonts.googleapis.com/css2?family=Cinzel:wght@500;600;700&family=Crimson+Pro:ital,wght@0,400;0,500;0,600;1,400&family=Inter:wght@400;500;600&display=swap"
|
|
rel="stylesheet"
|
|
/>
|
|
<title>AI D&D</title>
|
|
</head>
|
|
<body>
|
|
<div id="root"></div>
|
|
<script type="module" src="/src/main.jsx"></script>
|
|
</body>
|
|
</html>
|