Browse Source

Don't close and re-open menu if selection unchanged.

pull/7953/head
Steven Kirk 4 years ago
parent
commit
20d50b348a
  1. 3
      src/Avalonia.Controls/Platform/DefaultMenuInteractionHandler.cs

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

@ -252,7 +252,8 @@ namespace Avalonia.Controls.Platform
// new menu.
if (item.IsSubMenuOpen &&
item.Parent is IMenu &&
item.Parent.SelectedItem is object)
item.Parent.SelectedItem is object &&
item.Parent.SelectedItem != item)
{
item.Close();
Open(item.Parent.SelectedItem, true);

Loading…
Cancel
Save