Browse Source
Merge pull request #5094 from AvaloniaUI/fixes/5002-menu-tab-navigation
Don't handle tab navigation in DefaultMenuInteractionHandler.
pull/5107/head
Dan Walmsley
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
2 additions and
2 deletions
-
src/Avalonia.Controls/Platform/DefaultMenuInteractionHandler.cs
-
src/Avalonia.Input/NavigationDirection.cs
|
|
|
@ -231,7 +231,7 @@ namespace Avalonia.Controls.Platform |
|
|
|
{ |
|
|
|
var direction = e.Key.ToNavigationDirection(); |
|
|
|
|
|
|
|
if (direction.HasValue) |
|
|
|
if (direction?.IsDirectional() == true) |
|
|
|
{ |
|
|
|
if (item == null && _isContextMenu) |
|
|
|
{ |
|
|
|
|
|
|
|
@ -83,7 +83,7 @@ namespace Avalonia.Input |
|
|
|
/// </returns>
|
|
|
|
public static bool IsDirectional(this NavigationDirection direction) |
|
|
|
{ |
|
|
|
return direction > NavigationDirection.Previous || |
|
|
|
return direction > NavigationDirection.Previous && |
|
|
|
direction <= NavigationDirection.PageDown; |
|
|
|
} |
|
|
|
|
|
|
|
|