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 toggle causes keyboard change; keyboard does not automatically come up #27946
Comments
Update this so it does not go stale. This is still an issue. |
Sounds like you're still hitting this. Is this true on latest version? (60 is a couple versions behind now) |
|
I can still reproduce this on the expo snack I referenced above, which is using expo v36.0.0. |
And my own app is now at 0.62.0, and it is still an issue there as well. |
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. |
Not stale. |
Confirmed repro on provided Snack. Android
iOS
|
same here |
Any update on this? If you change keyboardType on Android you have to re-focus the text-input for the keyboard to come back up. This is a pain for things like toggling secureTextEntry. |
A few updates on this item.
When the prop secureTextEntry is true, the code sets the input type to InputType.TYPE_NUMBER_VARIATION_PASSWORD (versus keeping the input type a number). @ReactProp(name = "secureTextEntry", defaultBoolean = false) Then within check password type, it will switch it to the numbered type with the password variant. I am having trouble finding documentation on the android developer site which actually shows the different keyboards (with a picture!), but here is the android doc: So, this seems to be working as it is coded; but the question remains....should it be switching the type if the intended keyboard type was number, to include password variants, or should it just keep the keyboard the same in the case of numeric types? An alternate would be, if there is a possibility of toggling the secure text entry flag, then the keyboard which appears when secureTextEntry is true should be available as a keyboard type in react native.
|
Not stale, needing resolution. |
Same problem, any workaround here? |
Yeah not stale, it still need fixes on Android |
In version 0.63.4 the issue still remains |
I think the possible solution would be to let us revert back the Keyboard type from 'visible-password' to the one that is being set when the secureText entry is set to True ( In Android ). The possible workaround was to toggle the boolean value in secureTextEntry with state variable and set the keyboardType to 'visible-password' once the secureTextEntry is set to false but, the password won't revert back to obscured text once the keyboard is set to 'visible-password'. We need fix on this issue. Or is there any other workaround ? I heard that the facebook app is also build with React Native? But they are doing fine on toggling password visibility in Android. Is there anything that we're missing or still unaware of ? |
The minimum reproducable example class RewriteExample extends React.Component<$FlowFixMeProps, any> {
constructor(props) {
super(props);
this.state = {show: true};
}
render() {
return (
<>
<TextInput
keyboardType={'numeric'}
secureTextEntry={!this.state.show}
/>
<Button title="show" onPress={() => this.setState({show: !this.state.show})} />
</>
);
}
} I was trying to understand which flag is applied and the correlated limitations from the Android API (#26799 (comment)) |
Still has the, Keyboard change issue on Android, |
Please provide the solution or at least a viable workaround. |
Still an issue. |
same here |
This is indeed still an issue. |
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. |
any update on this? |
I have the some problem |
Solution is to import Pressable from react-native ... (note: I am using ui kitten library) |
is there an update on this ? did anyone find a way to get the same numbers keyboard type that's used when secure text entry flag is set to true on android ? |
the same issue |
0.72.5 . same issue here. |
0.72.4, same issue here. |
there is no fix to solve this? |
Description:
When enabling the user to toggle the secure text entry flag on a text input, on Android, two issues are occurring:
React Native version:
System: OS: Windows 10 10.0.17134
CPU: (4) ia32 Intel(R) Pentium(R) CPU G4560T @ 2.90GHz
Memory: 1.65 GB / 7.43 GB
Binaries:
Node: 12.10.0 - C:\Program Files (x86)\nodejs\node.EXE
Yarn: 1.10.1 - C:\Users\mjfiandaca\AppData\Roaming\npm\yarn.CMD
npm: 6.13.4 - C:\Program Files (x86)\nodejs\npm.CMD
SDKs:
Android SDK:
API Levels: 23, 25, 26, 27, 28
Build Tools: 23.0.1, 25.0.1, 26.0.3, 27.0.3, 28.0.0, 28.0.3
System Images: android-23 | Intel x86 Atom, android-23 | Google APIs Intel x86 Atom, android-23 | Google APIs Intel x86 Atom_64, android-26 | Google APIs Intel x86 Atom, android-26 | Google APIs Intel x86 Atom_64, android-27 | Google APIs Intel x86 Atom, android-27 | Google Play Intel x86 Atom, android-28 | Intel x86 Atom, android-28 | Intel x86 Atom_64, android-28 | Google APIs Intel x86 Atom, android-28 | Google APIs Intel x86 Atom_64, android-28 | Google Play Intel x86 Atom
IDEs:
Android Studio: Version 3.5.0.0 AI-191.8026.42.35.6010548
npmPackages:
react: 16.8.6 => 16.8.6
react-native: 0.60.6 => 0.60.6
Steps To Reproduce
Expected Results
The keyboard should not change based on the secure text entry value.
Snack, code example, screenshot, or link to a repository:
https://snack.expo.io/@mjfiandaca/toggle-securetextentry
The text was updated successfully, but these errors were encountered: