Repository navigation
Studio: stop iOS Safari zooming into chat text fields - #10972
Conversation
|
Codex Review: Didn't find any major issues. Nice work! Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
…m floor The floor applies to every text control on a coarse pointer, which includes tablets at desktop widths, and three controls were sized against 9px to 12px text. Measured base against head, the GPU monitor select clips the descenders of a device name inside its 24px box and a long name pushes the row past a 393px viewport, and the two mono numeric fields in the training params cut their last digit out of w-12 and w-14. Each control gets a pointer-coarse companion, so every mouse layout stays byte identical. Also add a test for the floor itself: it asserts the rule is still in @layer base, since an unlayered copy loses to text-ui-13! and the field would zoom again, and that the three companions survive. Checked in Chromium 151, Firefox 153 and WebKit 26.5 across iPhone SE, iPhone 15, Pixel 7, iPad mini, iPad Pro landscape, an Android tablet, a Windows tablet-mode viewport and two desktop widths, at UI font scales 0.9375 and 1.25.
|
I ran this one end to end against real browser engines rather than reading it, and pushed one commit (b448caf) for the three places the 16px floor outgrows its box. Summary of what was measured and what it found. SetupBuilt The rule itself holds up
Desktop is provably unchangedOn the two fine pointer desktop profiles, base and head are identical on every probe in all three engines: font size, width, height, top, left, zero deltas. Same for a desktop print context. Printing from a touch device does pick up the 16px fields, since the rule is not scoped to The composer, which is the point of the PR14.06px to 16px, and the collapsed row does not move: What did break, and the fix in b448cafThree controls were sized against 9px to 12px text and the floor overflows them. Each fix is a
Screenshots of the select before and after the fix, with descender heavy text, are what settled it: the The commit also adds Things I looked at and decided not to touch
Gates
What this host could not answerPlaywright WebKit on Linux is desktop WebKit: it pins |
|
@codex security review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Hooray! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review |
|
Codex Review: Something went wrong. Try again later by commenting “@codex review”. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review |
1 similar comment
|
@codex review |
|
Codex Review: Didn't find any major issues. Already looking forward to the next diff. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
Merging this with admin. State at merge, for the record. Codex has converged on the current head ( CI on One check is red and stays red: Cross-platform validation for this branch ran off the org queue on a staging replica: ubuntu-latest, windows-latest, macos-15 and the studio-live Playwright suite all succeeded. Those staging PRs are closed, never merged. |
iOS Safari zooms the page when a focused field renders below 16px and never zooms back out, which pushed the header and send button off screen after every message. Floor every text-entry control at max(16px, 1rem * --ui-font-scale) under (hover: none) and (pointer: coarse), in @layer base so the important declaration beats the important utilities in the utilities layer. Three compact controls were sized against 9px to 12px text and clip their value at the floor, so each gets a pointer-coarse companion: the GPU monitor select, and the two mono numeric fields in the training params. Mouse layouts are unchanged. Co-authored-by: oobabooga <[email protected]>
On an iPhone, focusing the chat composer zooms the page, and the zoom remains after the keyboard closes. This pushes the header and send button off-screen and forces the user to pinch back out after each message.
Reported on Reddit.
Cause and fix
iOS Safari zooms into focused text fields smaller than 16px. At the default UI font size, the composer renders at 14.06px and the shared mobile
InputandTextareacomponents render at 15px because their font tokens include--ui-font-scale.An unlayered rule in
index.css, limited to(hover: none) and (pointer: coarse), gives text inputs, textareas and selects a 16px minimum while preserving larger UI font preferences. It overrides Tailwind utilities without!importantand excludes checkboxes, radios, ranges, file pickers and buttons.Before and after
Measured in the iOS 17.5 Simulator using an iPhone 15 and Mobile Safari:
mainAs a control, a bare 14px textarea zoomed to 1.142 while a 16px textarea stayed at 1. A desktop Chromium viewport was unchanged. A larger UI font preference still applied, and a three-line composer draft still wrapped and grew correctly.
Verification and scope
main; the remaining failure passed three isolated reruns on this branch.Before and after on a touch viewport
Two isolated Studio installs, built from this PR's merge base (
66a38c7) and from its head (08532c6), driven on the same 393x852 viewport with a coarse primary pointer. Both sides reportmatches_coarse: trueand--ui-font-scale: .9375.Chat composer, clipped to its own box:
The same pair, whole page:
Measured on the servers that were photographed:
The composer row does not move:
leading-6is a fixed length, so the collapsed height stays 40px.Compact controls that needed a companion
The floor lands on every text control under a coarse pointer, which includes tablets at desktop widths. Three controls were sized against 9px to 12px text, so a base-versus-head sweep in Chromium 151, Firefox 153 and WebKit 26.5 across iPhone SE, iPhone 15, Pixel 7, iPad mini, iPad Pro landscape, an Android tablet, a Windows tablet-mode viewport and two desktop widths, at UI font scales 0.9375 and 1.25, found them clipping their value:
select(h-6)pointer-coarse:h-auto min-w-0 max-w-fullw-12)pointer-coarse:w-16w-14)pointer-coarse:w-20Each companion is coarse-pointer only, and the same sweep reports zero geometry or computed-style deltas on the fine-pointer desktop profiles, including a desktop print context.