Browse Source
Merge pull request #11221 from AvaloniaUI/fixes/treeviewitem-shouldnt-handle-spacekey
Dont expand/collapse TreeViewItem on space key.
pull/11262/head
Dan Walmsley
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
1 additions and
1 deletions
-
src/Avalonia.Controls/TreeViewItem.cs
|
|
|
@ -165,7 +165,7 @@ namespace Avalonia.Controls |
|
|
|
{ |
|
|
|
Key.Left => ApplyToItemOrRecursivelyIfCtrl(FocusAwareCollapseItem, e.KeyModifiers), |
|
|
|
Key.Right => ApplyToItemOrRecursivelyIfCtrl(ExpandItem, e.KeyModifiers), |
|
|
|
Key.Enter or Key.Space => ApplyToItemOrRecursivelyIfCtrl(IsExpanded ? CollapseItem : ExpandItem, e.KeyModifiers), |
|
|
|
Key.Enter => ApplyToItemOrRecursivelyIfCtrl(IsExpanded ? CollapseItem : ExpandItem, e.KeyModifiers), |
|
|
|
|
|
|
|
// do not handle CTRL with numpad keys
|
|
|
|
Key.Subtract => FocusAwareCollapseItem, |
|
|
|
|