microsoft / microsoft/fluentui-blazor
FluentMenuItem Enter key does not invoke OnClick in standalone FluentMenu
@adamint is already working on this.
Since Jul 9, 2026.
- Dominant language
- C#
- Stars
- 4.8k
- Forks
- 483
- Avg merge
- 14h 41m
- Merged PRs (30d)
- 68
Description
Describe the bug
When a FluentMenuItem inside a standalone FluentMenu is focused, pressing Enter does not invoke the Blazor OnClick callback. Pointer click on the same item does invoke OnClick.
Expected behavior
Keyboard activation with Enter should behave like pointer activation and invoke the menu item's OnClick callback.
Actual behavior
The focused fluent-menu-item receives browser keydown and keyup events for Enter, but the configured Blazor OnClick callback is not invoked.
Notes from investigation
This was observed while fixing keyboard accessibility in the Aspire Dashboard Resources page.
Diagnostics against Microsoft.FluentUI.AspNetCore.Components 4.14.1:
- The browser event target and active element were both
fluent-menu-item. - Document capture and bubble listeners both observed
keydownforEnter|Enter. - Document capture observed
keyupforEnter|Enter. - No synthetic click was emitted by the browser.
- Pointer click on the same
FluentMenuIteminvoked the configured BlazorOnClickcallback. - Decompiling
FluentMenuItemshowed an internalOnKeyDownHandlerAsyncpath that appears intended to callOnClickHandlerAsync(new MouseEventArgs())whenKeyboardEventArgs.Code == "Enter", but that path did not result in the publicOnClickcallback being invoked in this rendered standalone-menu shape. - Passing
onkeyupthroughAdditionalAttributesor Razor unmatched attributes onFluentMenuItemalso did not reach the app callback in this shape.
Related downstream context
Downstream PR: https://github.com/microsoft/aspire/pull/17926
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.