-
Notifications
You must be signed in to change notification settings - Fork 452
Open
Labels
area:fluent-ui-web-componentsA FluentUI specific issueA FluentUI specific issuebugA bugA bugstatus:blockedAny issue blocked by anotherAny issue blocked by another
Description
🐛 Bug Report
When navigating to an EditForm's submit button by keyboard and hitting Enter, submit occurs twice.
💻 Repro or Code Sample
dotnet new install Microsoft.FluentUI.AspNetCore.Templates::4.1.1
dotnet new fluentblazor
Replace Counter.razor content with the following, tab your way to the FluentButton and hit Enter -> current count is incremented by 2.
@page "/counter"
@rendermode InteractiveServer
<PageTitle>Counter</PageTitle>
<h1>Counter</h1>
<p role="status">Current count: <FluentBadge Appearance="Appearance.Neutral">@currentCount</FluentBadge></p>
<EditForm OnValidSubmit=@IncrementCount Model="new { }">
<button type="submit">Submit with normal button -> +1</button>
<FluentButton Appearance="Appearance.Accent" Type=@ButtonType.Submit>Submit with FluentButton -> +2</FluentButton>
</EditForm>
@code {
private int currentCount = 0;
private void IncrementCount()
{
currentCount++;
}
}
🌍 Your Environment
Occurs at least in Edge and Firefox
thebarrettlo, harshalbaviskar, oiBio and gthvmt
Metadata
Metadata
Assignees
Labels
area:fluent-ui-web-componentsA FluentUI specific issueA FluentUI specific issuebugA bugA bugstatus:blockedAny issue blocked by anotherAny issue blocked by another