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

The TextBox input using the PasswordChar property has incorrect behavior on Android #15658

Closed
elargacha opened this issue May 8, 2024 · 9 comments
Labels

Comments

@elargacha
Copy link

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

  1. Create a new app from the Avalonia template.
  2. Add the following code snippet (obtained from [11.0.0] TextBox input broken on Android since RC2 #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>
  1. 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

@elargacha elargacha added the bug label May 8, 2024
@emmauss
Copy link
Contributor

emmauss commented May 8, 2024

Could you test with the latest nightly builds?

@elargacha
Copy link
Author

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.

@timunie
Copy link
Contributor

timunie commented May 8, 2024

@elargacha
Copy link
Author

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.

@emmauss
Copy link
Contributor

emmauss commented May 8, 2024

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

@elargacha
Copy link
Author

nightly builds

Yes, is in my nugget config 👌

@emmauss
Copy link
Contributor

emmauss commented May 9, 2024

I'm unable to reproduce this on 11.1.0-beta2. Could you provide a minimal reproduction, with project and nuget config

@elargacha
Copy link
Author

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

@timunie
Copy link
Contributor

timunie commented May 13, 2024

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.

@timunie timunie closed this as completed May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants