NativeScript
NativeScript copied to clipboard
TextField with [secure] string don't work on Android with core plugin 8.6.2
Issue Description
I have a TextField for a login and registration service in my Application. We are using the [secure] function from the TextField for the password input. In the version of @nativescript/core 8.6.2 occurs a bug for Android (API Range 26-34). When you change the [secure] vaule by runtime on android the input will not be visibile.
The version 8.6.1 don't have this bug.
Reproduction
The source code of our company application is not public. But you can check this with a simple TextField using [secure]="BooleanVariable"
Relevant log output (if applicable)
No response
Environment
No response
Please accept these terms
- [X] I have searched the existing issues as well as StackOverflow and this has not been posted before
- [X] This is a bug report
- [X] I agree to follow this project's Code of Conduct
8.6.2 truly contains changes related to TextField but we'll need more information, like the previous and new boolean value or whether problem occurs both ways (true <-> false). Also, does the textfield have any other attributes? A stackblitz sample that replicates this would also be helpful.
EDITED: I failed to reproduce it with an API 29 device so I think we'll need that reproducible sample.
In version 8.6.5 the problem persists on Android. If you change 'secure' from true to false the text is not displayed. If the initial state is true and you change it to false, it works but changes the font type and the cursor moves to the beginning of the text.
In version 8.6.5 the problem persists on Android. If you change 'secure' from true to false the text is not displayed. If the initial state is true and you change it to false, it works but changes the font type and the cursor moves to the beginning of the text.
I have the same problem :(
@ignacio68 @Bezlepkin Can you please post a reproducible sample? Stackblitz or repo will do.
@ignacio68 @Bezlepkin Can you please post a reproducible sample? Stackblitz or repo will do.
https://stackblitz.com/edit/nativescript-stackblitz-templates-eod1hz?file=app%2Fcomponents%2FHome.vue
The bug is reproduced exactly if you set: keyboardType="number"
If I comment out this line: https://github.com/NativeScript/NativeScript/blob/main/packages/core/ui/text-field/index.android.ts#L115 everything works :)
If I comment out this line: https://github.com/NativeScript/NativeScript/blob/main/packages/core/ui/text-field/index.android.ts#L115 everything works :)
This one is needed to fix another problem just as described in the comment. I'll try to reproduce it with your sample. I'd like us to keep the benefits of those changes and solve the problem described. Worse case scenario, we'll revert the changes that caused this.
@Bezlepkin Can you try without a keyboard type?
@Bezlepkin Can you try without a keyboard type?
Without specifying keyboardType, it works correctly