Skip to content

fix(peptide-calculator): stop iOS zooming the viewport on the free-entry field - #247

Merged
Snouzy merged 1 commit into
mainfrom
feat/peptide-calculator
Jul 31, 2026
Merged

Snouzy merged 1 commit into
mainfrom
feat/peptide-calculator

Conversation

@Snouzy

@Snouzy Snouzy commented Jul 31, 2026

Copy link
Copy Markdown
Owner

Follow-up to #246, which is already merged. The only content difference against main is this one file.

The bug

Safari on iOS zooms the page when it focuses an input whose computed font-size is under 16px, and it does not zoom back out. Tapping "Other…" on the calculator left the whole widget scaled and cropped for the rest of the session.

The cause

The field was text-sm. The project does not override Tailwind's sm step and the root size is 16px, so that computed to 14px — just under the threshold. text-base puts it at 16px exactly.

Verified

In an emulated 390px iOS viewport: computed font-size 16px, the field still fits (9 → 355 of 390), page horizontal overflow stays at 0. pnpm lint exits 0, 28 tests pass.

Same bug elsewhere, not fixed here

src/components/ui/input.tsx is text-sm/[10px] (14px), and its Search variant is text-xs (12px). Every form using the shared input zooms the same way on iPhone. Left alone deliberately — shared chrome, worth its own change.

@vercel

vercel Bot commented Jul 31, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
workout-cool-opqe Ready Ready Preview Jul 31, 2026 11:28am

Request Review

…try field

Safari on iOS zooms the page when it focuses an input whose computed font-size
is under 16px, and it does not zoom back out — the calculator stays scaled and
cropped for the rest of the session.

The field was `text-sm`. The project does not override Tailwind's `sm` step and
the root size is 16px, so that computed to 14px, just under the threshold.
`text-base` puts it at 16px exactly.

Verified in an emulated 390px iOS viewport: computed font-size 16px, the field
still fits (9 to 355 of 390), and page horizontal overflow stays at 0.
@Snouzy
Snouzy force-pushed the feat/peptide-calculator branch from 7c0c2f8 to 8b40f2d Compare July 31, 2026 11:27
@Snouzy
Snouzy merged commit e3dcd23 into main Jul 31, 2026
4 checks passed
@Snouzy
Snouzy deleted the feat/peptide-calculator branch July 31, 2026 11:30

This branch was successfully deployed

1 active deployment
Preview — 8b40f2d9 Deployed Jul 31, 2026 by vercel[bot]
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.

1 participant