Skip to content

Fix mobile browser auto-zoom on form input focus#216

Merged
prazgaitis merged 1 commit into
mainfrom
claude/fix-mobile-zoom-form-Yh4w7
Mar 12, 2026
Merged

Fix mobile browser auto-zoom on form input focus#216
prazgaitis merged 1 commit into
mainfrom
claude/fix-mobile-zoom-form-Yh4w7

Conversation

@prazgaitis
Copy link
Copy Markdown
Owner

Summary

Fixes an issue where mobile browsers (especially iOS Safari) auto-zoom when users focus on form input fields with font sizes below 16px. This was causing a disorienting zoom effect in the activity logging dialog.

The fix involves three changes:

  1. Add maximumScale: 1 to the viewport configuration to prevent browser-initiated zoom
  2. Update CommandInput component to use text-base md:text-sm pattern (16px on mobile, 14px on desktop)
  3. Update RichTextEditor to use text-base md:text-sm pattern for its editor input

These changes ensure form inputs maintain a minimum 16px font size on mobile devices, which prevents the auto-zoom behavior while keeping the compact 14px size on desktop.

Testing

  • pnpm lint
  • pnpm typecheck
  • Manual testing: Verify form inputs in activity dialog don't trigger zoom on mobile Safari/Chrome

Notes

The main Input component already followed the correct text-base md:text-sm pattern, so only CommandInput and RichTextEditor needed updates.

https://claude.ai/code/session_01F4yz48PD6qwAUkbynvc7st

iOS Safari auto-zooms when inputs have font-size < 16px. Three fixes:
- Add maximumScale: 1 to viewport config to prevent browser zoom on focus
- Update CommandInput to use text-base on mobile (md:text-sm on desktop)
- Update RichTextEditor to use text-base on mobile (md:text-sm on desktop)

https://claude.ai/code/session_01F4yz48PD6qwAUkbynvc7st
@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 12, 2026

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

Project Deployment Actions Updated (UTC)
march-fitness-2025 Ready Ready Preview, Comment Mar 12, 2026 2:06am

Request Review

@prazgaitis prazgaitis merged commit 46b2a8b into main Mar 12, 2026
5 checks passed
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.

2 participants