Skip to content

mobile: keep the composer above the on-screen keyboard (#164) - #165

Merged
Lexus2016 merged 1 commit into
mainfrom
fix/mobile-keyboard-composer-164
Dec 1, 2026
Merged

Lexus2016 merged 1 commit into
mainfrom
fix/mobile-keyboard-composer-164

Conversation

@Lexus2016

Copy link
Copy Markdown
Owner

What

100dvh follows the browser toolbars, not the on-screen keyboard. With the keyboard open the layout keeps its full height, so the bottom-anchored composer sits under it and the phone user cannot see what they are typing (#164).

  • public/index.html viewport meta now carries interactive-widget=resizes-content, so Chrome/Android shrinks the layout viewport when the keyboard opens.
  • iOS Safari ignores that hint and reports the keyboard only through visualViewport, so syncKeyboardViewport() pins body.style.height to the visible band while a textarea / input / contenteditable has focus, and drops the inline height when the keyboard closes. A pinch-zoom (scale !== 1) and a toolbar-sized shrink with nothing focused leave the page alone.

Evidence

Real layout, Chromium at 390x844 with mobile emulation; the keyboard is simulated by shrinking visualViewport.height to 430px (the only signal iOS gives):

tree composer bottom input bottom above the keyboard
main (dbbbfa6) 844 829 no
this branch (f188acd) 430 415 yes

test/mobile-keyboard-viewport.test.js (new, wired into the npm test chain) runs the real block from index.html in a vm: the pin/clear decision table, the meta, and the listener registration — 9 checks.

Local chain on this host (Node 24.22.1): every suite up to kanban-run-badges passes, and all 79 suites from i18n-completeness through external-api pass, the new one included. The chain aborts at test/task-backlog.test.js with "the refusing server on port 4553 did not start" — that happens identically on origin/main on this host (HOST=localhost binds ::1 here while the probe reaches 127.0.0.1), so it is pre-existing and environmental, not this change.

WebKit could not be measured here (the bundled build is missing system libraries), so the iOS path is covered by the vm suite rather than a device run.

Closes #164

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Dec 1, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-12-01T15:18:36.449290Z f188acd PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@Lexus2016
Lexus2016 merged commit 6b3f642 into main Dec 1, 2026
3 checks passed
@Lexus2016
Lexus2016 deleted the fix/mobile-keyboard-composer-164 branch December 1, 2026 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Mobile portrait: on-screen keyboard hides the prompt input

1 participant