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

TextInput with secureTextEntry loses value #9148

Closed
rob-johansen opened this issue Aug 1, 2016 · 7 comments
Closed

TextInput with secureTextEntry loses value #9148

rob-johansen opened this issue Aug 1, 2016 · 7 comments
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@rob-johansen
Copy link

I'm developing an app with React Native 0.29.1 and React 15.2.1 in Mac OS X El Capitan 10.11.5. I've noticed that a TextInput with secureTextEntry set to true will lose its value if you:

  1. Type some characters into the input.
  2. Blur the input (give focus to something else).
  3. Focus the input.
  4. Type another character.

I've reproduced the issue here:

https://rnplay.org/apps/Xpn4uw

@vonovak
Copy link
Collaborator

vonovak commented Aug 2, 2016

what you probably want to do is store the values in your state object, i.e. call setState on changing input text and set the TextInput's value prop.

@rob-johansen
Copy link
Author

I actually tried that, but it doesn't fix the problem (should have mentioned it in my original post).

@vonovak
Copy link
Collaborator

vonovak commented Aug 2, 2016

hmm, quite interesting indeed. Looking at it closer, I found out that is actually the intended behavior on ios. Try launching the RN play demo, and go to settings -> icloud and try your procedure

@alexHlebnikov
Copy link

alexHlebnikov commented Aug 3, 2016

I've got the same problem after updating from 0.27.0 to 0.29.0 or 0.30.0.
Saving query in state doesn't helps. Feels like a TextInput component bug.

@RD1991
Copy link

RD1991 commented Aug 13, 2016

This is default behaviour. This works same in iOS native development.

@gabriel
Copy link

gabriel commented Oct 11, 2016

@lacker
Copy link
Contributor

lacker commented Feb 9, 2017

I'm going to close this issue as "works as intended". In general if something works a particular way in iOS native development it seems reasonable to consider it out of scope for RN to fix it.

@lacker lacker closed this as completed Feb 9, 2017
@facebook facebook locked as resolved and limited conversation to collaborators Jul 19, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

7 participants