Skip to content

fix(macos): draw a TextInput's plain text and bullets in its color - #3144

Open
Bron Davies (brondavies) wants to merge 1 commit into
microsoft:mainfrom
brondavies:fix/text-field-text-color
Open

Bron Davies (brondavies) wants to merge 1 commit into
microsoft:mainfrom
brondavies:fix/text-field-text-color

Conversation

@brondavies

Copy link
Copy Markdown

Summary:

On macOS, a TextInput's color doesn't reach its bullets with secureTextEntry, nor its text once secureTextEntry is turned off: both draw in the system's black. setDefaultTextAttributes: puts the color only into the attributed string, but a secure cell draws its bullets in textColor, and the field _setSecureTextEntry: swaps in gets its text through text, which uses textColor too.

This also sets textColor from the default attributes.

Test Plan:

RNTester-macOS (Debug, arm64, Xcode 27.1, macOS 26.6.2), Playground on a dark background with <TextInput secureTextEntry defaultValue="secret" style={{color: 'white'}} />, and a second one toggled from secure to plain:

  • On main, the bullets and the plain text are black.
  • With this change, both are white.

@brondavies
Bron Davies (brondavies) requested a review from a team as a code owner October 23, 2026 18:33
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

This branch has not been deployed

No deployments
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.

1 participant