Skip to content

fix(ui): set input font-size to 16px to prevent iOS Safari auto-zoom on focus#64673

Closed
NianJiuZst wants to merge 1 commit into
openclaw:mainfrom
NianJiuZst:fix/ios-safari-zoom-input-font-size
Closed

fix(ui): set input font-size to 16px to prevent iOS Safari auto-zoom on focus#64673
NianJiuZst wants to merge 1 commit into
openclaw:mainfrom
NianJiuZst:fix/ios-safari-zoom-input-font-size

Conversation

@NianJiuZst

Copy link
Copy Markdown
Contributor

Summary

On iPhone/iOS Safari, the OpenClaw Control UI chat input and other text inputs render below the iOS 16px threshold, so Safari auto-zooms the page every time the user focuses a field.

This makes the Control UI feel broken as an iOS home screen web app — typing in the chat box repeatedly zooms the interface in and out.

Changes

Set font-size: 16px on all interactive text inputs to match the iOS Safari threshold:

  • ui/src/styles/chat/layout.css:

    • .chat-compose .chat-compose__field textarea: 14px16px
    • .agent-chat__input > textarea: 0.92rem (≈13px) → 16px
  • ui/src/styles/components.css:

    • .field input, .field textarea, .field select: added font-size: 16px

Why 16px

iOS Safari uses a 16px font-size threshold — inputs smaller than 16px trigger auto-zoom on focus. This is browser behavior and cannot be overridden with JavaScript; only CSS font-size changes prevent it.

Testing

  • Open Control UI in iOS Simulator or real iPhone Safari
  • Focus the main chat input — confirm no auto-zoom
  • Focus other form fields — confirm no auto-zoom
  • Verify visual appearance of input text is acceptable at 16px

Fixes #64651

@greptile-apps

greptile-apps Bot commented Apr 11, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR sets font-size: 16px on the chat compose textarea, agent chat textarea, and all .field inputs/selects to prevent iOS Safari's auto-zoom behaviour when any of these fields are focused. The fix is correct and well-targeted — 16px is the documented iOS Safari threshold.

Confidence Score: 5/5

Safe to merge; the only finding is a misplaced stylelint suppression comment that has no effect on runtime CSS behaviour.

All findings are P2. The CSS fix itself is correct, the visual change is intentional and minimal, and the misplaced stylelint comment does not affect how the browser renders the page.

layout.css — the stylelint-disable-next-line comment should be moved inside the rule block if stylelint enforcement is active.

Prompt To Fix All With AI
This is a comment left during a code review.
Path: ui/src/styles/chat/layout.css
Line: 362-364

Comment:
**Misplaced stylelint suppression comment**

The `stylelint-disable-next-line declaration-property-allowed-list` comment is positioned outside and after the closing `}` of the `.chat-compose .chat-compose__field textarea` rule — so it will target the next selector (`.chat-compose__field textarea:disabled`) rather than the `font-size: 16px` declaration inside the preceding rule. The suppression doesn't apply to the line it was intended to cover.

If the project's stylelint config has a `declaration-property-allowed-list` that restricts `font-size`, the actual violation is on line 358 and this disable comment won't suppress it. Move the comment inside the rule block, immediately before the `font-size` declaration:

```suggestion
.chat-compose .chat-compose__field textarea {
  /* ... other declarations ... */
  /* iOS Safari zoom prevention: inputs < 16px trigger auto-zoom on focus */
  /* stylelint-disable-next-line declaration-property-allowed-list */
  font-size: 16px;
  line-height: 1.45;
}

.chat-compose__field textarea:disabled {
```
(The informational comment and the suppress directive should sit directly before `font-size: 16px` inside the rule, not after its closing brace.)

How can I resolve this? If you propose a fix, please make it concise.

Reviews (1): Last reviewed commit: "fix(ui): set form input font-size to 16p..." | Re-trigger Greptile

Comment thread ui/src/styles/chat/layout.css Outdated
@clawsweeper

clawsweeper Bot commented Apr 27, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge.

Summary
The PR adds touch-primary 16px CSS overrides for chat, shared form, and config text-entry controls, plus CSS assertion tests and a changelog entry.

Reproducibility: yes. for source-level reproduction: the linked issue has concrete iPhone Safari steps and real-device confirmation, and current main still styles the active composer below 16px. I did not run a live iOS Safari session in this read-only review.

Real behavior proof
Needs real behavior proof before merge: The PR body has only an unchecked manual checklist and no after-fix iPhone Safari or Simulator evidence; the contributor should add redacted screenshots, recording, terminal/live output, or logs and update the PR body to trigger re-review.

Next step before merge
External PR follow-up is needed for real iOS proof plus selector repair/rebase; automation cannot supply the required contributor setup proof.

Security
Cleared: The diff is limited to CSS, CSS-reading tests, and a changelog entry, with no concrete security or supply-chain concern.

Review findings

  • [P2] Target the active composer textarea — ui/src/styles/chat/layout.css:570
Review details

Best possible solution:

Land a rebased CSS-only fix that targets .agent-chat__composer-combobox > textarea plus the other affected text-entry controls on touch-primary devices, with focused CSS assertions and redacted iOS Safari or Simulator proof.

Do we have a high-confidence way to reproduce the issue?

Yes, for source-level reproduction: the linked issue has concrete iPhone Safari steps and real-device confirmation, and current main still styles the active composer below 16px. I did not run a live iOS Safari session in this read-only review.

Is this the best way to solve the issue?

No, not as currently patched. The 16px touch-primary CSS direction is maintainable, but the PR must target the current composer selector and include after-fix real behavior proof before merge.

Full review comments:

  • [P2] Target the active composer textarea — ui/src/styles/chat/layout.css:570
    The current chat composer textarea is rendered inside .agent-chat__composer-combobox, but this media rule only matches a direct .agent-chat__input > textarea child. The primary chat input therefore remains at 0.92rem on touch devices, so iOS Safari can still auto-zoom on focus.
    Confidence: 0.92

Overall correctness: patch is incorrect
Overall confidence: 0.92

What I checked:

  • Current main active composer DOM: Current main renders the primary chat textarea inside .agent-chat__composer-combobox, not as a direct child of .agent-chat__input. (ui/src/ui/views/chat.ts:1381, 266e72149b7f)
  • Current main active composer remains below 16px: The active .agent-chat__composer-combobox > textarea rule is still font-size: 0.92rem, and the legacy chat compose textarea is still 14px on current main. (ui/src/styles/chat/layout.css:591, 266e72149b7f)
  • PR diff misses the active selector: The PR adds a touch-primary rule for .chat-compose .chat-compose__field textarea and .agent-chat__input > textarea, but not .agent-chat__composer-combobox > textarea, so it does not cover the current main composer DOM. (ui/src/styles/chat/layout.css:570, b4fc87474911)
  • Linked issue has a source-level reproduction path: The linked issue gives iPhone Safari/home-screen focus steps and includes reporter confirmation that setting interactive fields to 16px resolves the Control UI auto-zoom behavior.
  • Real behavior proof is still missing: Live PR metadata and comments show only an unchecked manual checklist plus repeated failing Real behavior proof checks, with no after-fix iPhone Safari or Simulator evidence. (b4fc87474911)
  • Related item search: Search found the canonical issue plus two overlapping PRs; the broader closed attempt was superseded, while this PR and the adjacent mobile Safari layout PR remain open.

Likely related people:

  • BunsDev: GitHub file history shows repeated recent commits across the affected Control UI chat, components, config, and responsive styling surfaces. (role: major adjacent Control UI contributor; confidence: high; commits: 5a90179e8fdf, 098b72910dea, 20cbc1f21683; files: ui/src/styles/chat/layout.css, ui/src/ui/views/chat.ts, ui/src/styles/components.css)
  • steipete: Recent WebChat/Control UI history touches the active composer and chat styling paths, and local blame in this checkout routes the affected current lines through Peter Steinberger commits. (role: recent area contributor; confidence: medium; commits: 68359cacbf58, e11a8a84ac3f, 330ba1fa3194; files: ui/src/styles/chat/layout.css, ui/src/ui/views/chat.ts)
  • vincentkoc: The PR is assigned to vincentkoc, and the discussion says ProjectClownfish pushed a narrow repair to preserve the contributor branch path. (role: active PR repair owner; confidence: medium; commits: 67dd20d13dd6, 41275270ddca, 63d5f948afa8; files: ui/src/styles/chat/layout.css, ui/src/styles/components.css, ui/src/styles/config.css)

Remaining risk / open question:

Codex review notes: model gpt-5.5, reasoning high; reviewed against 266e72149b7f.

@vincentkoc
vincentkoc force-pushed the fix/ios-safari-zoom-input-font-size branch from 928323e to 67dd20d Compare April 28, 2026 07:48
@vincentkoc

Copy link
Copy Markdown
Member

ProjectClownfish pushed a narrow repair to this branch so the original contributor path can stay canonical.

Source PR: #64673
Validation: pnpm check:changed
Contributor credit is preserved in the branch history and PR context.

@vincentkoc vincentkoc added clownfish:human-review clawsweeper Tracked by ClawSweeper automation and removed clownfish:merge-ready labels Apr 28, 2026
@NianJiuZst
NianJiuZst force-pushed the fix/ios-safari-zoom-input-font-size branch from 67dd20d to e88518b Compare April 29, 2026 03:40
@NianJiuZst
NianJiuZst force-pushed the fix/ios-safari-zoom-input-font-size branch from e0b2524 to f3eb054 Compare April 29, 2026 04:49
@vincentkoc vincentkoc self-assigned this Apr 29, 2026
@vincentkoc
vincentkoc force-pushed the fix/ios-safari-zoom-input-font-size branch 3 times, most recently from 63d5f94 to 84eea16 Compare April 29, 2026 05:44
@vincentkoc
vincentkoc force-pushed the fix/ios-safari-zoom-input-font-size branch from 84eea16 to b4fc874 Compare April 29, 2026 05:48
@openclaw-barnacle

Copy link
Copy Markdown

This assigned pull request has been automatically marked as stale after being open for 27 days.
Please add updates or it will be closed.

@openclaw-barnacle openclaw-barnacle Bot added stale Marked as stale due to inactivity triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. and removed stale Marked as stale due to inactivity labels May 9, 2026
@openclaw-barnacle

Copy link
Copy Markdown

This assigned pull request has been automatically marked as stale after being open for 27 days.
Please add updates or it will be closed.

@openclaw-barnacle openclaw-barnacle Bot added stale Marked as stale due to inactivity and removed stale Marked as stale due to inactivity labels May 10, 2026
@openclaw-barnacle

Copy link
Copy Markdown

This assigned pull request has been automatically marked as stale after being open for 27 days.
Please add updates or it will be closed.

@openclaw-barnacle openclaw-barnacle Bot added stale Marked as stale due to inactivity and removed stale Marked as stale due to inactivity labels May 12, 2026
@openclaw-barnacle

Copy link
Copy Markdown

This assigned pull request has been automatically marked as stale after being open for 27 days.
Please add updates or it will be closed.

@openclaw-barnacle openclaw-barnacle Bot added the stale Marked as stale due to inactivity label May 13, 2026
@BunsDev

BunsDev commented May 14, 2026

Copy link
Copy Markdown
Contributor

Closing this as superseded by #81639.

Reason: this branch is now merge-conflicting and had repeated failed real-behavior proof checks, while #81639 carries the same narrow Control UI iOS input-zoom fix forward on current main, keeps the contributor credit in the changelog/PR context, and has a passing Real behavior proof check.

Replacement proof on #81639:

  • focused CSS tests for chat, shared form, config, and usage controls
  • pnpm check:changed
  • mobile WebKit computed-style proof showing every targeted text-entry control at 16px

Thanks for the original report and patch direction; the replacement PR keeps that path credited while giving maintainers a clean branch to land.

@BunsDev BunsDev closed this May 14, 2026
BunsDev added a commit that referenced this pull request May 14, 2026
Fixes #64651. Supersedes #64673.

Keeps shared form, config, and usage Control UI text-entry controls at 16px on touch-primary devices while preserving chat composer input sizing, so iOS Safari no longer auto-zooms focused fields.

Verification:
- pnpm exec oxfmt --check --threads=1 CHANGELOG.md ui/src/styles/components.css ui/src/styles/config.css ui/src/styles/usage.css ui/src/styles/chat/layout.test.ts ui/src/styles/components.test.ts ui/src/styles/config.test.ts ui/src/styles/usage.test.ts
- git diff --check
- pnpm test ui/src/styles/chat/layout.test.ts ui/src/styles/components.test.ts ui/src/styles/config.test.ts ui/src/styles/usage.test.ts
- pnpm check:changed
- Playwright WebKit iPhone 12 computed-style proof for all targeted controls at 16px
- GitHub Real behavior proof, CI, and workflow sanity on exact PR head fa0d44a
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request May 24, 2026
Fixes openclaw#64651. Supersedes openclaw#64673.

Keeps shared form, config, and usage Control UI text-entry controls at 16px on touch-primary devices while preserving chat composer input sizing, so iOS Safari no longer auto-zooms focused fields.

Verification:
- pnpm exec oxfmt --check --threads=1 CHANGELOG.md ui/src/styles/components.css ui/src/styles/config.css ui/src/styles/usage.css ui/src/styles/chat/layout.test.ts ui/src/styles/components.test.ts ui/src/styles/config.test.ts ui/src/styles/usage.test.ts
- git diff --check
- pnpm test ui/src/styles/chat/layout.test.ts ui/src/styles/components.test.ts ui/src/styles/config.test.ts ui/src/styles/usage.test.ts
- pnpm check:changed
- Playwright WebKit iPhone 12 computed-style proof for all targeted controls at 16px
- GitHub Real behavior proof, CI, and workflow sanity on exact PR head fa0d44a
jameslcowan pushed a commit to jameslcowan/openclaw that referenced this pull request Jun 2, 2026
Fixes openclaw#64651. Supersedes openclaw#64673.

Keeps shared form, config, and usage Control UI text-entry controls at 16px on touch-primary devices while preserving chat composer input sizing, so iOS Safari no longer auto-zooms focused fields.

Verification:
- pnpm exec oxfmt --check --threads=1 CHANGELOG.md ui/src/styles/components.css ui/src/styles/config.css ui/src/styles/usage.css ui/src/styles/chat/layout.test.ts ui/src/styles/components.test.ts ui/src/styles/config.test.ts ui/src/styles/usage.test.ts
- git diff --check
- pnpm test ui/src/styles/chat/layout.test.ts ui/src/styles/components.test.ts ui/src/styles/config.test.ts ui/src/styles/usage.test.ts
- pnpm check:changed
- Playwright WebKit iPhone 12 computed-style proof for all targeted controls at 16px
- GitHub Real behavior proof, CI, and workflow sanity on exact PR head fa0d44a
sablehead pushed a commit to sablehead/openclaw that referenced this pull request Jun 10, 2026
Fixes openclaw#64651. Supersedes openclaw#64673.

Keeps shared form, config, and usage Control UI text-entry controls at 16px on touch-primary devices while preserving chat composer input sizing, so iOS Safari no longer auto-zooms focused fields.

Verification:
- pnpm exec oxfmt --check --threads=1 CHANGELOG.md ui/src/styles/components.css ui/src/styles/config.css ui/src/styles/usage.css ui/src/styles/chat/layout.test.ts ui/src/styles/components.test.ts ui/src/styles/config.test.ts ui/src/styles/usage.test.ts
- git diff --check
- pnpm test ui/src/styles/chat/layout.test.ts ui/src/styles/components.test.ts ui/src/styles/config.test.ts ui/src/styles/usage.test.ts
- pnpm check:changed
- Playwright WebKit iPhone 12 computed-style proof for all targeted controls at 16px
- GitHub Real behavior proof, CI, and workflow sanity on exact PR head fa0d44a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui clawsweeper Tracked by ClawSweeper automation size: S stale Marked as stale due to inactivity triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Control UI on iOS auto-zooms when focusing chat/input fields

3 participants