The TextBox input using the PasswordChar property has incorrect behavior on Android
elargacha opened this issue · comments
Describe the bug
Using a TextBox with the PasswordChar property, the first character I type is duplicated.
Char.repeated.in.Android.with.PasswordChar.mp4
To Reproduce
- Create a new app from the Avalonia template.
- Add the following code snippet (obtained from #12067, @msneijders) to the view:
<StackPanel Margin="20" Spacing="20">
<TextBox
x:Name="text"
HorizontalAlignment="Stretch"
VerticalAlignment="Center" />
<TextBox
x:Name="pass"
HorizontalAlignment="Stretch"
VerticalAlignment="Center"
PasswordChar="*" />
<TextBlock HorizontalAlignment="Stretch" Text="{Binding #pass.Text}" />
</StackPanel>
- Write in the second text box and observe the behavior.
Expected behavior
Ensure that the text entered in the textbox is correct even when masked with "*". That means typing the corresponding character for the letter pressed on the keyboard and not duplicating any of them.
Avalonia version
11.0.2, 11.1.0-beta1, 11.1.0-beta2
OS
Android
Additional context
Possible issue related:
#12067
Could you test with the latest nightly builds?
Could you test with the latest nightly builds?
@emmauss, the latest nightly builds? Aren't those version 11.1.0-beta1 and version 11.1.0-beta2?
If so, it's already been tested with both. I used the Avalonia template (11.0.2) to reproduce the issue. But I also updated to the latest nightly builds (and to .Net 8 version), and the issue still occurs.
https://github.com/AvaloniaUI/Avalonia/wiki/Using-nightly-build-feed
Right! Sorry for the confusion...
I've set up the new source and tested it with Avalonia version 11.2.999-cibuild0048199-alpha, and it has still the same behavior.
https://github.com/AvaloniaUI/Avalonia/wiki/Using-nightly-build-feed
Right! Sorry for the confusion...
I've set up the new source and tested it with Avalonia version 11.2.999-cibuild0048199-alpha, and it has still the same behavior.
Did you check if the feed is in your nugget config
nightly builds
Yes, is in my nugget config 👌
I'm unable to reproduce this on 11.1.0-beta2. Could you provide a minimal reproduction, with project and nuget config
I'm unable to reproduce this on 11.1.0-beta2. Could you provide a minimal reproduction, with project and nuget config
I have tested with the latest version of Avalonia Nightly (11.2.999-cibuild0048370-alpha) and the bug is no longer reproducible.
With version 11.1.0-beta2, it still occurs, but predictive text must be enabled in the keyboard settings
Link to the project: https://github.com/LongoMatch/AvaloniaIssuePasswordChar
if nightly solves the issue, I'll close it for now. If it happens in 11.1 release again, ping me and we can reopen the issue.