From d0edfa0447b27949edb4e4af7de6d938b66ddf37 Mon Sep 17 00:00:00 2001 From: Steven Kirk Date: Tue, 23 Jun 2020 10:31:55 +0200 Subject: [PATCH] Close submenu when pointer leaves. --- .../Platform/DefaultMenuInteractionHandler.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Avalonia.Controls/Platform/DefaultMenuInteractionHandler.cs b/src/Avalonia.Controls/Platform/DefaultMenuInteractionHandler.cs index e61e88c22b..6747ac80cd 100644 --- a/src/Avalonia.Controls/Platform/DefaultMenuInteractionHandler.cs +++ b/src/Avalonia.Controls/Platform/DefaultMenuInteractionHandler.cs @@ -333,6 +333,10 @@ namespace Avalonia.Controls.Platform { item.Parent.SelectedItem = null; } + else if (!item.IsPointerOverSubMenu) + { + item.IsSubMenuOpen = false; + } } }