diff --git a/src/Avalonia.Controls/Platform/DefaultMenuInteractionHandler.cs b/src/Avalonia.Controls/Platform/DefaultMenuInteractionHandler.cs index 942104d61b..0badd918cc 100644 --- a/src/Avalonia.Controls/Platform/DefaultMenuInteractionHandler.cs +++ b/src/Avalonia.Controls/Platform/DefaultMenuInteractionHandler.cs @@ -336,7 +336,18 @@ namespace Avalonia.Controls.Platform if (e.MouseButton == MouseButton.Left && item?.HasSubMenu == true) { - Open(item, false); + if (item.IsSubMenuOpen) + { + if (item.Parent is Menu) + { + CloseMenu(item); + } + } + else + { + Open(item, false); + } + e.Handled = true; } }