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

MatTextfield - autocomplete off not working while Type is password #935

Open
LePtitJoNadeau opened this issue Apr 24, 2023 · 0 comments
Open
Labels
bug Something isn't working

Comments

@LePtitJoNadeau
Copy link

LePtitJoNadeau commented Apr 24, 2023

System info
MatBlazor version = 2.8.0

Describe the bug
When setting Type="password", MatTextField can be autocomplete by browser but shouldn't.

@Not working correctly: Should not display autocomplete data@
<MatTextField InputAttributes="InputAttributes" Type="password" @bind-Value="Value">
@Working correctly: Should not display autocomplete data@
<MatTextField InputAttributes="InputAttributes" @bind-Value="Value">

@code {
private IDictionary<string, object> InputAttributes { get; set; }
private string Value { get; set; }

protected override void OnInitialized()
{
    InputAttributes = new Dictionary<string, object>();
    InputAttributes.Add("autocomplete", "off");
}

}

Expected behavior
When setting autocomplete to "off" and have type to "password", shouldn't display any autocomplete data.

Behaviour should be like first screen shot but without displaying autofill data.

Screenshots

When type is not specified:
image
When type is set to password:
image

Thank you for taking this unexpected behaviour in consideration :)

Jonatan

@LePtitJoNadeau LePtitJoNadeau added the bug Something isn't working label Apr 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant