fix(web): prevent iOS Safari auto-zoom on input focus#1652
fix(web): prevent iOS Safari auto-zoom on input focus#1652juliusmarminge merged 2 commits intopingdotgg:mainfrom
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
iOS Safari automatically zooms into input/contenteditable elements when their font size is below 16px. Use 16px on mobile (< 640px) and preserve the original smaller sizes on desktop (>= 640px). Affected inputs: - Composer editor (text-[16px] sm:text-[14px]) - Composer placeholder (text-[16px] sm:text-[14px]) - Sidebar thread rename input (text-[16px] sm:text-xs) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: codex <codex@users.noreply.github.com>
d58ea96 to
5cb0507
Compare
ApprovabilityVerdict: Approved Pure CSS changes implementing a standard iOS Safari auto-zoom prevention fix. Uses responsive You can customize Macroscope's approvability policy. Learn more. |
- Use base text size for editable prompt and rename inputs - Keep tooltip widths and wrapping consistent with longer content - Preserve 14px sizing on sm+ breakpoints
Dismissing prior approval to re-evaluate 8aa0401
What Changed
Use
text-[16px] sm:text-[14px]on the composer editor, its placeholder, and the sidebar thread rename input. This sets font size to 16px on mobile (< 640px) while preserving the original smaller sizes on desktop (≥ 640px).Why
iOS Safari automatically zooms into any input/contenteditable element with
font-size < 16pxwhen focused. This breaks the viewport in mobile web/PWA — the user has to manually pinch-to-zoom back out after every interaction. 16px is the threshold that prevents this behavior.Checklist
Note
Low Risk
Purely presentational Tailwind class tweaks; no logic, data, or security-sensitive code paths are changed.
Overview
Prevents iOS Safari’s focus auto-zoom by increasing the base font size to 16px on small screens for the
ComposerPromptEditorcontenteditable + placeholder and the sidebar thread rename input (keeping prior sizes viasm:overrides).Also standardizes tooltip max-width styling in the composer mention/skill chips by switching from
max-w-[30rem]tomax-w-120.Reviewed by Cursor Bugbot for commit 8aa0401. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Prevent iOS Safari auto-zoom on input focus in composer and sidebar
iOS Safari auto-zooms inputs with font sizes below 16px. This fix sets text size to
text-base(16px) by default with asm:breakpoint override restoring the original smaller size on larger screens.text-[14px]totext-base sm:text-[14px];break-wordsreplaced withwrap-break-wordtext-xstotext-base sm:text-xsmax-w-[30rem]tomax-w-120in mention and skill decoratorsMacroscope summarized 8aa0401.