fix(maestro): keep mobile key bar above the soft keyboard
ci / rust (push) Successful in 8m46s

On Android the soft keyboard overlaid the layout viewport and the browser
auto-scrolled the document on focus, dragging the shell (and its special-key
bar) to the top of the screen and forcing a manual scroll.

- index.html: interactive-widget=resizes-content so Chrome resizes the layout
  viewport instead of overlaying the keyboard, killing the auto-scroll.
- viewport.ts: mirror visualViewport.offsetTop into --app-top for iOS / older
  browsers that ignore interactive-widget and still scroll under the keyboard.
- styles.css: translateY(--app-top) re-pins #app to the visible region.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-20 20:49:46 +00:00
co-authored by Claude Opus 4.8
parent 7f3ac21402
commit d989a40772
3 changed files with 17 additions and 3 deletions
+4 -1
View File
@@ -211,8 +211,11 @@ body {
#app {
/* `--app-vh` tracks the *visual* viewport (set by installViewportSizing) so
the shell stays above the mobile soft keyboard; falls back to the layout
viewport where `visualViewport` is unavailable. */
viewport where `visualViewport` is unavailable. `--app-top` follows the
layout viewport's scroll under the keyboard so the shell stays pinned to
the visible region instead of drifting to the top. */
height: var(--app-vh, 100%);
transform: translateY(var(--app-top, 0px));
display: flex;
flex-direction: column;
overflow: hidden;