[Bug]: Focusing the chat input zooms the app in causing weird scroll on mobile
Before submitting
- [x] I searched existing issues and did not find a duplicate.
- [x] I included enough detail to reproduce or investigate the problem.
Area
apps/web
Steps to reproduce
Focusing the chat input. You will see that a zoom in occurs.
Expected behavior
the sticky header and footer should stay stick and no scrolling should occur.
Actual behavior
See https://github.com/user-attachments/assets/fe87b3e0-86db-4d3e-aa48-9a2c4baedc67
Impact
Cosmetic issue
Version or commit
main @ 9e29c9d72895022322da52d8e961b38702bad9cc
Environment
iOS Chrome
Logs or stack traces
Screenshots, recordings, or supporting files
Workaround
No response
Bug exists for me aswell (samsung galaxy s24 ultra)
Note: #1652 was merged today and addressed this for the chat composer and the sidebar thread-rename input specifically (text-base sm:text-[14px]), but I think this issue should stay open until two remaining gaps are closed:
-
Other inputs still trigger the same auto-zoom. Settings text fields, search bars (model picker, branch picker), and any future input added without the
text-base sm:prefix re-introduce the bug. The Samsung Galaxy S24 Ultra confirmation by @JKamsker above was on a non-composer input — focusing the composer is fixed by #1652, but other touch points are still vulnerable. -
The
sm:breakpoint (640px) is narrower than several touch devices. iPhone Pro Max in landscape and iPad in any orientation are wider than 640px, so they get the desktop-sized 14px fromsm:text-[14px]and Safari auto-zooms again on focus.
I just opened #2434 with a defense-in-depth fix: a single @media (hover: none) and (pointer: coarse) rule that floors form controls to max(16px, 1em) on touch devices only. It complements #1652 (per-component classes still work) and leaves desktop UIs completely unchanged. Diff is purely additive (+21 lines in apps/web/src/index.css, no deletions, no other files touched).
Happy to fold this into a different shape if there's a preferred direction — file a comment on #2434 if so.