Browse Source

Fix arrow left on all-disabled submenu closing menu

pull/8514/head
Luis von der Eltz 4 years ago
parent
commit
ace7787526
  1. 6
      src/Avalonia.Controls/Platform/DefaultMenuInteractionHandler.cs

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

@ -175,7 +175,11 @@ namespace Avalonia.Controls.Platform
case Key.Left:
{
if (item?.Parent is IMenuItem parent && !parent.IsTopLevel && parent.IsSubMenuOpen)
if (item is { IsSubMenuOpen: true, SelectedItem: null })
{
item.Close();
}
else if (item?.Parent is IMenuItem { IsTopLevel: false, IsSubMenuOpen: true } parent)
{
parent.Close();
parent.Focus();

Loading…
Cancel
Save