Skip to content

fix: Input text misalignment#26049

Merged
brianacnguyen merged 2 commits intomainfrom
fix/input-placeholder-alignment
Feb 13, 2026
Merged

fix: Input text misalignment#26049
brianacnguyen merged 2 commits intomainfrom
fix/input-placeholder-alignment

Conversation

@brianacnguyen
Copy link
Copy Markdown
Contributor

@brianacnguyen brianacnguyen commented Feb 12, 2026

Description

Reason for the change

On iOS, TextInput can show intermittent placeholder text misalignment or clipping. This comes from a React Native bug: TextInput still uses the default usesFontLeading = YES in NSLayoutManager, while Text was fixed in 2020 with usesFontLeading = NO. With Geist’s large ascender/leading, Fabric’s text measurement becomes inconsistent, so placeholder alignment is unstable.

Improvement / solution

Add lineHeight: 0 to the Input base styles in Input.styles.ts. This gives Fabric a fixed line height and avoids the faulty font-leading calculation. Unlike lineHeight: 20, it does not reintroduce the multi-line wrapping issue. No native changes or rebuilds are required.

References


Changelog

CHANGELOG entry: Fixed intermittent placeholder text alignment and clipping in text inputs on iOS.


Related issues

Fixes:


Manual testing steps

Feature: Text input placeholder alignment

  Scenario: user views single-line text inputs on iOS
    Given the app is running on an iOS device or simulator
    When the user opens screens with text inputs (e.g. Send, Swap, custom token amount)
    Then placeholder text is vertically aligned and does not shift or clip on focus/blur or after re-renders

Screenshots/Recordings

Before

Simulator.Screen.Recording.-.iPhone.15.Pro.Max.-.2026-02-12.at.09.50.05.mov

After

Simulator.Screen.Recording.-.iPhone.15.Pro.Max.-.2026-02-12.at.15.08.39.mov

Verified on Android
IMG_0029

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

Note

Low Risk
Small, style-only change to a shared input component; main risk is unintended layout differences in text rendering across platforms and screens.

Overview
Fixes intermittent iOS TextInput placeholder vertical misalignment/clipping by forcing a fixed lineHeight: 0 in the shared Input base styles (Input.styles.ts).

Updates a large set of Jest snapshots across screens/components that render this Input to reflect the new style output.

Written by Cursor Bugbot for commit cd3cd24. This will update automatically on new commits. Configure here.

@brianacnguyen brianacnguyen self-assigned this Feb 12, 2026
@brianacnguyen brianacnguyen added the team-design-system All issues relating to design system in Mobile label Feb 12, 2026
@brianacnguyen brianacnguyen requested a review from a team as a code owner February 12, 2026 23:16
@github-actions
Copy link
Copy Markdown
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@github-actions
Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

  • Selected E2E tags: None (no tests recommended)
  • Selected Performance tags: None (no tests recommended)
  • Risk Level: low
  • AI Confidence: 92%
click to see 🤖 AI reasoning details

E2E Test Selection:
This PR makes a single styling change to the Input component in the component library - adding lineHeight: 0 to fix text alignment/baseline issues. All 24 changed files are snapshot updates that reflect this single CSS property addition consistently across all components that use the Input field.

The change is purely cosmetic/visual and affects:

  • Login/Password screens
  • Account name editing
  • Snaps UI inputs
  • Ramps/Deposit form fields
  • Card authentication
  • Network search inputs

However, E2E tests are not appropriate for validating this change because:

  1. E2E tests verify functional behavior, not pixel-perfect CSS styling
  2. The lineHeight property change would not be detectable by E2E test assertions
  3. All unit test snapshots have been properly updated to reflect the change
  4. The change is consistent and expected across all affected components

This is a low-risk styling fix with no functional impact that doesn't warrant E2E test execution.

Performance Test Selection:
This is a pure CSS styling change (adding lineHeight: 0 to Input component). CSS lineHeight is a simple property that has no measurable impact on rendering performance, data loading, state management, or app initialization. No performance tests are needed for this cosmetic fix.

View GitHub Actions results

Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

@sonarqubecloud
Copy link
Copy Markdown

@brianacnguyen brianacnguyen added this pull request to the merge queue Feb 12, 2026
Merged via the queue into main with commit afdd000 Feb 13, 2026
74 checks passed
@brianacnguyen brianacnguyen deleted the fix/input-placeholder-alignment branch February 13, 2026 00:04
@github-actions github-actions bot locked and limited conversation to collaborators Feb 13, 2026
@metamaskbot metamaskbot added the release-7.67.0 Issue or pull request that will be included in release 7.67.0 label Feb 13, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.67.0 Issue or pull request that will be included in release 7.67.0 size-XS team-design-system All issues relating to design system in Mobile

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants