Browse Source

Merge pull request #9567 from AvaloniaUI/fixes/default-menu-interaction-handler

fix logic that was broken accidentally in #9553
pull/9578/head
Steven Kirk 3 years ago
committed by GitHub
parent
commit
2d4649ef36
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/Avalonia.Controls/Platform/DefaultMenuInteractionHandler.cs

2
src/Avalonia.Controls/Platform/DefaultMenuInteractionHandler.cs

@ -461,7 +461,7 @@ namespace Avalonia.Controls.Platform
{
if (Menu?.IsOpen == true)
{
if (e.Source is ILogical control && Menu.IsLogicalAncestorOf(control))
if (e.Source is ILogical control && !Menu.IsLogicalAncestorOf(control))
{
Menu.Close();
}

Loading…
Cancel
Save