question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[iOS] TextInput default text color change to white when running on real device

See original GitHub issue

React Native version:

System: OS: macOS 10.15.2 CPU: (4) x64 Intel® Core™ i5-4570R CPU @ 2.70GHz Memory: 69.59 MB / 16.00 GB Shell: 5.7.1 - /bin/zsh Binaries: Node: 13.5.0 - /usr/local/bin/node Yarn: 1.21.1 - /usr/local/bin/yarn npm: 6.13.4 - /usr/local/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman SDKs: iOS SDK: Platforms: iOS 13.2, DriverKit 19.0, macOS 10.15, tvOS 13.2, watchOS 6.1 Android SDK: API Levels: 23, 25, 26, 27, 28 Build Tools: 23.0.1, 23.0.2, 25.0.0, 25.0.1, 25.0.2, 26.0.2, 26.0.3, 27.0.3, 28.0.2, 28.0.3 System Images: android-23 | Google APIs ARM EABI v7a, android-23 | Google APIs Intel x86 Atom, android-27 | Google APIs Intel x86 Atom, android-27 | Google Play Intel x86 Atom, android-28 | Google Play Intel x86 Atom IDEs: Xcode: 11.3/11C29 - /usr/bin/xcodebuild npmPackages: react: 16.9.0 => 16.9.0 react-native: 0.61.5 => 0.61.5

Steps To Reproduce

  1. git clone git@github.com:james1888/RnTextInputBug.git
  2. cd RnTextInputBug
  3. npm start
  4. npm ios
  5. open xcode
  6. connect real device
  7. run on real device

On simulator

ezgif com-video-to-gif (1)

On real device

ezgif com-video-to-gif

Describe what you expected to happen:

Default TextInput text color should be black on iOS

link to a repository: https://github.com/james1888/RnTextInputBug

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:16
  • Comments:24 (5 by maintainers)

github_iconTop GitHub Comments

27reactions
taylorklinecommented, Jun 30, 2020

In case anyone simply wants to revert to old behavior, you can disable your app’s dark mode support in your Info.plist:

<key>UIUserInterfaceStyle</key>
<string>Light</string>
13reactions
AlexKitCcommented, Jan 7, 2020

me too; ios iphone XR device;TextInput default color was white,can’t see it any more! simulator was ok,android was ok

Yes it’s working fine on Android and iOS Simulator but not on iOS real device.

just add +color= “#333” +placeholderTextColor=“#666” it would work well on ios real devices;solve it! just to try

Read more comments on GitHub >

github_iconTop Results From Across the Web

Text color is overridden to white when tested on a device with ...
The solution is changing the app to only light mode. ... Define default text color for android like so.
Read more >
Color - Foundations - Human Interface Guidelines - Design
The system can use a single color that's based on the wearer's selected color in a graphic complication's images, gauges, and text. For...
Read more >
TextInput - React Native
A foundational component for inputting text into the app via a keyboard. Props provide configurability for several features, such as auto- ...
Read more >
A complete guide to TextInput in React Native - LogRocket Blog
Learn how to implement React Native's TextInput component, ... It is a callback that runs whenever the text field detects a change:
Read more >
prefers-color-scheme - CSS: Cascading Style Sheets | MDN
Examples. Detecting a dark theme. The elements below have an initial color theme. They can be further themed according to the ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found