Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Android] TextInput secureTextEntry doesn't work if it have a keyboardType prop with values 'email-address' or 'phone-pad' #20606

Closed
samuelpismel opened this issue Aug 9, 2018 · 7 comments
Labels
Bug Component: TextInput Related to the TextInput component. Platform: Android Android applications. Platform: Linux Building on Linux. Stale There has been a lack of activity on this issue and it may be closed soon.

Comments

@samuelpismel
Copy link

Environment

Environment:
OS: Linux 4.4
Node: 8.11.3
Yarn: 1.9.2
npm: 6.3.0
Watchman: Not Found
Xcode: N/A
Android Studio: Not Found

Packages: (wanted => installed)
react: 16.3.1 => 16.3.1
react-native: https://github.com/expo/react-native/archive/sdk-29.0.0.tar.gz => 0.55.4

Description

[Android Only]

If you have an keyboardType prop with values 'email-address' or 'phone-pad' in your TextInput the secureTextEntry doesn't work and the input shows its value as a normal input (not like an password input).

Reproducible Demo

Snack full example: https://snack.expo.io/HkqrRfqS7

<TextInput
  secureTextEntry
  keyboardType="email-address"
/>

<TextInput
  secureTextEntry
  keyboardType="phone-pad"
/>
@react-native-bot react-native-bot added Platform: Android Android applications. Component: TextInput Related to the TextInput component. Platform: Linux Building on Linux. labels Aug 9, 2018
@isis1234
Copy link

omg that useful for me!! thank you very much!

@lubnaski
Copy link

Hello thanks for sharing.

But do you know why we can't paste from clipboard when the textinput is secure text? I tried your code on expo and the working one can't paste from clipboard while the one that didn't work can paste from clipboard.

@insideMan15
Copy link

Hi, thank you for your answer. I have met the same problems.

After resolving it, I think for the password input the keyboardType="default" is better than others in android.

@slorber
Copy link
Contributor

slorber commented Jan 31, 2019

can confirm, setting keyboardType default seems to fix this :o

@buchidiai
Copy link

wow thanks just saved me from 3 hrs of debugging

@stale
Copy link

stale bot commented Sep 28, 2019

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions.

@stale stale bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Sep 28, 2019
@stale
Copy link

stale bot commented Oct 5, 2019

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.

@stale stale bot closed this as completed Oct 5, 2019
@facebook facebook locked as resolved and limited conversation to collaborators Oct 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Component: TextInput Related to the TextInput component. Platform: Android Android applications. Platform: Linux Building on Linux. Stale There has been a lack of activity on this issue and it may be closed soon.
Projects
None yet
Development

No branches or pull requests

8 participants