-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Closed
Labels
area-blazorIncludes: Blazor, Razor ComponentsIncludes: Blazor, Razor Components
Milestone
Description
Is there an existing issue for this?
- I have searched the existing issues
Describe the bug
The property autocomplete="off"
seems to be ignored by Blazor. Both in InputX
components and in normal input binding.
Expected Behavior
I expect the browser to not suggest any details when autocomplete="off"
is set.
Steps To Reproduce
- Add this razor code:
<EditForm Model="Input" autocomplete="off" id="my-form" name="my-form-name">
<label for="name">Name:</label>
<InputText @bind-Value="@Input.DisplayName" autocomplete="off" id="name" name="my-name" />
</EditForm>
<label for="name2">Name:</label>
<input @bind="Input2.DisplayName" autocomplete="off" name="my-name2" id="name2" />
@code {
public User Input { get; set; } = new();
public User Input2 { get; set; } = new();
public class User
{
public int UserId { get; set; }
public string DisplayName { get; set; } = string.Empty;
}
}
- Add personal details in edge like this:
- Run the project in Microsoft Edge
- Click the inputs
You will see Edge suggestion autocomplete:
Exceptions (if any)
No response
.NET Version
10.0.100-preview.4.25258.110
Anything else?
No response
Metadata
Metadata
Assignees
Labels
area-blazorIncludes: Blazor, Razor ComponentsIncludes: Blazor, Razor Components