react-native: [Android] secureTextEntry={true} broken on Android for phone-pad and email-address keyboard types
Description
As nihgwu notes in #4090, secureTextEntry={true}
for TextInput
on Android is broken if you use the cross-platform keyboardTypes phone-pad
or email-address
. Seems to be related to how checkPasswordType in ReactTextInputManager is implemented.
Reproduction
Try the following in an Android RN component.
<TextInput
onChangeText={(text) => this.setState({ phonePadText: text })}
value={this.state.phonePadText}
secureTextEntry={true}
keyboardType="phone-pad"
/>
<TextInput
onChangeText={(text) => this.setState({ emailAddressText: text })}
value={this.state.emailAddressText}
secureTextEntry={true}
keyboardType="email-address"
/>
Additional Information
- React Native version: 0.35
- Platform: Android
- Operating System: MacOS
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 8
- Comments: 18 (3 by maintainers)
sorry, but it still does not work for android on v0.45.1
Broken iOS RN 0.49.0
Hi there! This issue is being closed because it has been inactive for a while. Maybe the issue has been fixed in a recent release, or perhaps it is not affecting a lot of people. Either way, we’re automatically closing issues after a period of inactivity. Please do not take it personally!
If you think this issue should definitely remain open, please let us know. The following information is helpful when it comes to determining if the issue should be re-opened:
If you would like to work on a patch to fix the issue, contributions are very welcome! Read through the contribution guide, and feel free to hop into #react-native if you need help planning your contribution.
Still broken as of now
yeah … still broken on the latest one. why is it closed ? there is a workaround for keyboardType=‘email-address’
keyboardType=‘twitter’ displays same keyboard
secureTextEntry with keyboardType ‘email-address’ is also broken.
RN: 0.43.1 Android Samsung Galaxy S6
@hramos Still broken in react native version 0.54.2