fix(maestro): hide mobile key bar when keyboard is dismissed while focused
ci / rust (push) Successful in 5m29s

Focus alone was the wrong signal: dismissing the soft keyboard (e.g. Android
back button) keeps the terminal focused, so the key bar lingered. Detect the
keyboard's actual visibility from the visual-viewport shrink — while an editable
element is focused, a height past a threshold below the focus-free baseline
means the keyboard is up — and gate the bar on a new `html.kb-open` class in
addition to the per-terminal focus class.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-20 21:04:15 +00:00
co-authored by Claude Opus 4.8
parent 6b0c92265e
commit 1006651fb4
2 changed files with 30 additions and 3 deletions
+6 -3
View File
@@ -1192,10 +1192,13 @@ textarea {
background: var(--surface);
}
/* Shown on touch only while the terminal is focused (soft keyboard up) — the
`keybar-active` class is toggled on textarea focus/blur in attach.ts. */
/* Shown on touch only while *this* terminal is focused (`keybar-active`, toggled
on textarea focus/blur in attach.ts) AND the soft keyboard is actually up
(`html.kb-open`, detected from the visual-viewport shrink in viewport.ts).
Both are needed: dismissing the keyboard doesn't blur the terminal, so focus
alone would leave the bar lingering. */
@media (pointer: coarse) {
.attach-keybar.keybar-active {
html.kb-open .attach-keybar.keybar-active {
display: grid;
}
}