fix(peptide-calculator): stop iOS zooming the viewport on the free-entry field - #247
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…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
force-pushed
the
feat/peptide-calculator
branch
from
July 31, 2026 11:27
7c0c2f8 to
8b40f2d
Compare
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #246, which is already merged. The only content difference against
mainis this one file.The bug
Safari on iOS zooms the page when it focuses an input whose computed
font-sizeis 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'ssmstep and the root size is 16px, so that computed to 14px — just under the threshold.text-baseputs it at 16px exactly.Verified
In an emulated 390px iOS viewport: computed
font-size16px, the field still fits (9 → 355 of 390), page horizontal overflow stays at 0.pnpm lintexits 0, 28 tests pass.Same bug elsewhere, not fixed here
src/components/ui/input.tsxistext-sm/[10px](14px), and itsSearchvariant istext-xs(12px). Every form using the shared input zooms the same way on iPhone. Left alone deliberately — shared chrome, worth its own change.