Skip to content

fix: vertically center single-line TextInput content - #3074

Merged
Saad Najmi (Saadnajmi) merged 2 commits into
microsoft:mainfrom
Saadnajmi:saadnajmi-fix-textinput-vertical-alignment
Aug 4, 2026
Merged

fix: vertically center single-line TextInput content#3074
Saad Najmi (Saadnajmi) merged 2 commits into
microsoft:mainfrom
Saadnajmi:saadnajmi-fix-textinput-vertical-alignment

Conversation

@Saadnajmi

Copy link
Copy Markdown
Collaborator

Summary:

Vertically center single-line TextInput content on macOS to match iOS, SwiftUI, and AppKit defaults.

The macOS text field cell previously used the full control height as its title rectangle. This placed text, placeholders, carets, and secure text at the top of controls with an explicit height. The updated title rectangle uses the intrinsic cell height and centers it within the padded bounds. Explicit padding remains applied, and multiline behavior is unchanged.

Test Plan:

  • Built the RNTester-macOS Release scheme with the JavaScript bundle embedded.
  • Verified placeholder text, entered text, caret position, asymmetric padding, and secure text in RNTester Playground.
  • Compared the result with native SwiftUI TextField/SecureField and AppKit NSTextField/NSSecureTextField controls.
Before After
Single-line TextInput content aligned to the top before the fix Single-line TextInput content vertically centered after the fix

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 56169cae-e214-4ad0-8e16-69e3af7a5948
@Saadnajmi
Saad Najmi (Saadnajmi) requested a review from a team as a code owner August 4, 2026 01:45
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 56169cae-e214-4ad0-8e16-69e3af7a5948
@Saadnajmi
Saad Najmi (Saadnajmi) enabled auto-merge (squash) August 4, 2026 02:09
@Saadnajmi Saad Najmi (Saadnajmi) changed the title fix(macos): vertically center single-line TextInput content fix: vertically center single-line TextInput content Aug 4, 2026
@Saadnajmi
Saad Najmi (Saadnajmi) merged commit 08ecdfd into microsoft:main Aug 4, 2026
40 of 53 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