Hi,
I have a context menu that I am opening with a button press. It looks something like:
<SfContextMenu @ref="ContextMenuFromButton" Target="#OperationsViewContextMenu" TValue="MenuItem" Items="MenuItemsFromButton">
<MenuEvents TValue="MenuItem" ItemSelected="ContextMenuItemClickedFromButton"></MenuEvents>
</SfContextMenu>
<span class="pr-2">
<button id="OperationsViewContextMenu" class="btn btn-sm btn-secondary" type="button" @onclick="((args) => ContextMenuOpenFromButton(args, _operation))">
<em class="fa fa-ellipsis-h"></em>
</button>
</span>
And in my code behind I have:
public void ContextMenuOpenFromButton(MouseEventArgs e)
{
ContextMenuOpenHandler(operation);
ContextMenuFromButton.Open(e.ClientX, e.ClientY);
}
When my ClientY is too close to the bottom of the screen, the context menu does not open (see vid) and causes weird movement within the page. I could get around this by doing some math before I call open and giving myselft extra space, but I feel like a solution should just work out of the box. Thanks for the feedback.
Attachment:
ContextMenuBroken_d80e5140.zip