question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Menu with submenus won't open

See original GitHub issue

Describe the bug I’ve updated from 0.10.7 to 0.10.10 and Menus seems to be broken (at least in macOS)

Whenever I press a Menu (that have sub-menu items), the menu won’t stay open, it just flicks and automatically closes

To Reproduce Steps to reproduce the behavior:

Create a sample project, and in the main view add a Menu with subitems Then press the Test menu

<Window xmlns="https://github.com/avaloniaui"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:vm="using:menu_bug.ViewModels"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
        x:Class="menu_bug.Views.MainWindow"
        Icon="/Assets/avalonia-logo.ico"
        Title="menu_bug">

    <Design.DataContext>
        <vm:MainWindowViewModel/>
    </Design.DataContext>

    <StackPanel>
        <Menu>
            <MenuItem Header="Test">
                <MenuItem Header="Test 1"></MenuItem>
                <MenuItem Header="Test 2"></MenuItem>
            </MenuItem>
            
        </Menu>
        <TextBlock Text="{Binding Greeting}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
    </StackPanel>
</Window>

Expected behavior The menu should remain open until the user clicks on a menu item, or somewhere else

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: macOS Monterey 12.0.1
  • Version 0.10.10

Additional context Add any other context about the problem here.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
mohdimascommented, Nov 11, 2021

I just tried it on the latest master branch, and the issue is still there for me.

0reactions
svenhuecommented, Apr 28, 2023

I am using version 11.0.0 preview5 on macOS and the menu only opens on click after entering full screen first. After that , it works as usual.

Is this behavior expected?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Submenu of a menu doesn't open
I have a dropdown-menu that contains multiple dropdown-item and an item that I want to be a submenu(that contains a list of item)....
Read more >
Windows Start Menu and some other Settings submenus ...
Hi,. Since some days on my 2-3 month old Windows 10 Pro, the Start menü stopped working. If I click on it a...
Read more >
After effects sub menus not working
None of the sub menus are working on right click im getting no response at all but they work by keyboard command. im...
Read more >
Problem with dropdown submenu items in menu
When hovering on the main menu item where the dropdown is, you can see the submenu items, but once hovered off the top...
Read more >
the menu tab that has submenus will not open on click at all.
For the menu in responsive mode it can be set in In the Menu tab -> Submenu -> Levels -> Options -> Levels...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found