Skip to content

MudFabMenuItem: Fix link rendering when Href is set#13195

Merged
danielchalmers merged 3 commits into
devfrom
copilot/fix-mudfabmenuitem-href
May 11, 2026
Merged

MudFabMenuItem: Fix link rendering when Href is set#13195
danielchalmers merged 3 commits into
devfrom
copilot/fix-mudfabmenuitem-href

Conversation

Copilot AI commented May 11, 2026

Copy link
Copy Markdown
Contributor

MudFabMenuItem was not behaving like other MudBlazor button-like components when Href was assigned. Instead of rendering as a navigable link, it dropped link-related parameters and remained a non-link button.

  • What changed

    • Forward Href, Target, Rel, and related inherited button parameters from MudFabMenuItem to the underlying MudFab.
    • Preserve existing MudFab link behavior so MudFabMenuItem now renders as an anchor when appropriate, including _blank + default noopener handling.
  • Behavioral impact

    • MudFabMenuItem now follows the same link semantics as MudButton, MudFab, and similar components.
    • Target, Rel, and anchor rendering work together instead of being silently ignored.
  • Regression coverage

    • Add focused tests verifying that a MudFabMenuItem with Href renders as <a> and emits the expected href, target, and rel attributes.
  • Example

    <MudFabMenu>
        <MudFabMenuItem Href="https://example.com"
                        Target="_blank"
                        Label="Open docs" />
    </MudFabMenu>

    This now renders the menu item as a clickable anchor and preserves the expected link attributes.

Copilot AI linked an issue May 11, 2026 that may be closed by this pull request
2 tasks
Copilot AI and others added 2 commits May 11, 2026 20:12
Agent-Logs-Url: https://github.com/MudBlazor/MudBlazor/sessions/1f0c5c7b-8d2e-46c5-a22b-c156141c6c29

Co-authored-by: danielchalmers <7112040+danielchalmers@users.noreply.github.com>
Agent-Logs-Url: https://github.com/MudBlazor/MudBlazor/sessions/1f0c5c7b-8d2e-46c5-a22b-c156141c6c29

Co-authored-by: danielchalmers <7112040+danielchalmers@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix MudFabMenuItem href functionality Fix MudFabMenuItem link rendering when Href is set May 11, 2026
Copilot AI requested a review from danielchalmers May 11, 2026 20:21
@danielchalmers danielchalmers marked this pull request as ready for review May 11, 2026 20:45
@mudbot mudbot Bot added the bug Unexpected behavior or functionality not working as intended label May 11, 2026
@mudbot mudbot Bot changed the title Fix MudFabMenuItem link rendering when Href is set MudFabMenuItem: Fix link rendering when Href is set May 11, 2026
This was referenced Jun 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Unexpected behavior or functionality not working as intended

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MudFabMenuItem Href not working

2 participants