Browse Source

Merge pull request #3143 from AvaloniaUI/fixes/fix-menu-hover-bug

Don't reopen an already active submenu on hover.
pull/3144/head
danwalmsley 7 years ago
committed by GitHub
parent
commit
4299cf3db2
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      src/Avalonia.Controls/Platform/DefaultMenuInteractionHandler.cs

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

@ -273,7 +273,8 @@ namespace Avalonia.Controls.Platform
if (item.IsTopLevel)
{
if (item.Parent.SelectedItem?.IsSubMenuOpen == true)
if (item != item.Parent.SelectedItem &&
item.Parent.SelectedItem?.IsSubMenuOpen == true)
{
item.Parent.SelectedItem.Close();
SelectItemAndAncestors(item);

Loading…
Cancel
Save