Skip to content

[Bug Report] Can dropdown menu items be flipped to the other side from the very beginning? #2591

Description

@zhusoz

Masa.Blazor version

1.11.9

Hosting model

Blazor Server

Describe the bug

When I put a dropdown menu in the fixed footer of a page, and then click the menu, the sub items will display in the wrong position. But once click it one more time, it will display in the right position. Could it be render correctly in the first time?

Image Image

Expected Behavior

Want it display correctly at the beginning instead of clicking menu twice.
Image

Steps To Reproduce

  1. Create a page with a fixed footer , which includes a dropdown menu.
  2. click the dropdown menu to check the behavior.

Reproduction code

part code of footer section:

<MContainer Fluid Class="mx-2 mt-2 fixed-bottom">
    <MRow NoGutters>
        <MCol Cols="10">
            [Your custom buttons...]
        </MCol>
        <MCol Cols="2">
            <MMenu Left Top OffsetY>
                <ActivatorContent>
                    <MButton Class="w-100" Icon @attributes="@context.Attrs">
                        <MIcon>mdi-dots-vertical</MIcon>
                    </MButton>
                </ActivatorContent>

                <ChildContent>
                    <MList BackgroundColor="white">
                        <MListItem>
                                <MListItemContent>
                                    <MListItemTitle>
                                        <MButton>Click me!</MButton>
                                    </MListItemTitle>
                                </MListItemContent>
                            </MListItem>
                    </MList>
                </ChildContent>
            </MMenu>
        </MCol>
    </MRow>
</MContainer>

.NET version

.NET 10.0

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions