Open
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 |
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.
What Changed
Prevents the chat composer from triggering iOS Safari's automatic page zoom when the editor is focused on mobile.
The fix does two things:
settings on blur.
This is scoped only to the composer and includes a small unit test for the viewport helper.
Why
On iPhone, tapping into the composer caused the page to zoom in slightly when the keyboard opened, which left the UI at the wrong zoom level
afterward and made the mobile experience feel broken.
This approach keeps the fix narrow:
UI Changes
Behavior change only. The composer no longer causes the page to zoom when focused on iPhone.
Checklist
ScreenRecording_03-29-2026.20-19-55_1.mp4
ScreenRecording_03-29-2026.20-23-01_1.mp4
Note
Medium Risk
Adds iOS-specific viewport meta manipulation on focus/blur and adjusts editor font sizing; mistakes could impact mobile zoom/scroll behavior if the viewport content isn’t restored correctly.
Overview
Prevents iOS Safari from auto-zooming when the chat composer is focused by raising the composer font size to 16px on coarse-pointer devices and wiring new focus/blur/touch handlers into
ComposerPromptEditor.Introduces a new
usePreventIosInputZoomhook that, on iOS/iPadOS, temporarily locks the page viewport (maximum-scale=1,user-scalable=no) while the editor is focused and restores the original viewport on blur/unmount, with unit tests covering platform detection and viewport content rewriting.Written by Cursor Bugbot for commit 5df2283. This will update automatically on new commits. Configure here.
Note
Prevent iOS composer input zoom by locking viewport on focus
usePreventIosInputZoomhook that mutates the viewport meta tag (maximum-scale=1,user-scalable=no) when a focusable element is focused on iOS/iPadOS, restoring the original viewport on blur.MacIntelplatform with multiple touch points.text-[14px]Tailwind class.user-scalable=notemporarily disables pinch-to-zoom globally while the composer is focused, which may affect accessibility.Macroscope summarized 5df2283.