MatBlazor icon indicating copy to clipboard operation
MatBlazor copied to clipboard

MatTextfield - autocomplete off not working while Type is password

Open LePtitJoNadeau opened this issue 2 years ago • 0 comments

System info MatBlazor version = 2.8.0 <PackageReference Include="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"></MatTextField> @Working correctly: Should not display autocomplete data@ <MatTextField InputAttributes="InputAttributes" @bind-Value="Value"></MatTextField>

@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 avatar Apr 24 '23 16:04 LePtitJoNadeau