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.

Thiago Vinhas (tvinhas) added a commit to tvinhas/react-native-macos that referenced this pull request Oct 28, 2026
Upstream v0.88.1 (30 commits, replayed onto the local v0.88.0 without the
agent files). Conflicts: fork identities and the vlists '*' peer kept;
Hermes 260318099.0.5; RCTStatusBarAppearance, the modal's status bar
capture and RCTRootViewController are iOS-only (macOS has no status bar,
visionOS lacks setNeedsStatusBarAppearanceUpdate); the SwiftUI filter
container sets safeAreaRegions through RCTPlatformHostingController;
SwiftPM autolinking keeps the per-platform UIKit/AppKit linker settings;
RNTester Podfile.lock regenerated with pod install.

Also from microsoft/react-native-macos (open PRs, macOS-only): secure
TextInput focus crash (microsoft#3141), TextInput color for bullets and plain text
(microsoft#3144), TextInput text stays put when resized while focused (microsoft#3150),
ScrollView scrolls over a multiline TextInput (microsoft#3146), inverted lists on
the new architecture (microsoft#3148), press over a TextInput (microsoft#3143), Dimensions
follow window resizes (microsoft#3142, plus removing its observer on invalidate),
RCTView shadow color retained (microsoft#3129), UIImage encoders extern "C"
(microsoft#3140), layout direction constants (microsoft#3131), and codegen skipping
unlinked third-party components (microsoft#3128, upstream react#59067).

.yarnrc.yml preapproves hermes-compiler@260318099.0.5 past the 7-day age
gate.

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