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.

[Android] <TextInput> secureTextEntry={true} broken on Android for phone-pad and email-address keyboard types

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:8
  • Comments:18 (3 by maintainers)

github_iconTop GitHub Comments

5reactions
DanGDroidcommented, Jul 24, 2017

sorry, but it still does not work for android on v0.45.1

3reactions
parohycommented, Oct 4, 2017

Broken iOS RN 0.49.0

Read more comments on GitHub >

github_iconTop Results From Across the Web

React Native Android TextInput secureTextEntry not working
I have defined the security for the text input on the second line. I don't use multiline but it still doesn't work. I...
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 >
An overview of all keyboard types available in React Native
In this article, we are going to define and compare all types of keyboards available in react-native. We will discuss how to create...
Read more >
App Extension Programming Guide: Custom Keyboard
The system keyboard presents an appropriate key set or layout based on the UIKeyboardType trait of the current text input object. With the ......
Read more >
TextInput · React Native
TextInput. A foundational component for inputting text into the app via a keyboard. Props provide configurability for several features, such as auto- ...
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