React-native: TextInput secureTextEntry color bug

Created on 24 Dec 2018  路  15Comments  路  Source: facebook/react-native

Environment

React Native Environment Info:
System:
OS: macOS 10.14.2
CPU: x64 Intel(R) Core(TM) i7-6820HQ CPU @ 2.70GHz
Memory: 120.61 MB / 16.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 10.13.0 - ~/.nvm/versions/node/v10.13.0/bin/node
Yarn: 1.9.4 - /usr/local/bin/yarn
npm: 6.4.1 - ~/.nvm/versions/node/v10.13.0/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 12.1, macOS 10.14, tvOS 12.1, watchOS 5.1
IDEs:
Android Studio: 3.1 AI-173.4907809
Xcode: 10.1/10B61 - /usr/bin/xcodebuild
npmPackages:
react: 16.5.0 => 16.5.0
react-native: ^0.57.2 => 0.57.2
npmGlobalPackages:
react-native-cli: 2.0.1

Description

I have a form with many textinputs, onFocus they have one color and onBlur another. All work fine until I add property secureTextEntry={true} to the field. After that the color doesn't change anymore.

Reproducible Demo

ref={this.input}
secureTextEntry
style={this.state.focusStyle ? {color: '#fff'} : {color: '#aaa'}}
onFocus={() => {
this.setState({
focusStyle: true
})
// this.input.current.setNativeProps({
// style: {
// color: '#fff'
// }
// })
}}
onBlur={() => {
this.setState({
focusStyle: false
})
// this.input.current.setNativeProps({
// style: {
// color: '#aaa'
// }
// })
}}
/>

Bug TextInput Locked

Most helpful comment

Still an issue in RN 0.59.5

All 15 comments

Can you run react-native info and edit your issue to include these results under the Environment section?

If you believe this information is irrelevant to the reported issue, you may write [skip envinfo] under Environment to let us know.

I ran into the same problem

Same issue here.
React Native version 0.57.2

Could someone please help with this issue? This is relevant one

i've gotten same issue. Could someone helps with that?
@react-native-bot

I've same issue. React Native version 0.57.8

the same
does someone fixes?

A month has passed, will this bug be fixed?

Encountering this issue on RN-0.57.7

@zaporozhetsAnton Did this issue happen on both platforms? It happened on ios only for me on RN-0.57.7

@peterdev6 I did not check it on the android platform

Just encountered this bug.

Confirmed on iOS with RN 0.58.4

Fixed by #23524

Still an issue in RN 0.59.5

Still an issue in RN 59.10 on iOS

Was this page helpful?
0 / 5 - 0 ratings