Browse Source
Merge branch 'master' into combobox-events
pull/9731/head
robloo
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
6 additions and
1 deletions
-
src/Avalonia.Controls/ComboBox.cs
|
|
@ -221,7 +221,12 @@ namespace Avalonia.Controls |
|
|
IsDropDownOpen = false; |
|
|
IsDropDownOpen = false; |
|
|
e.Handled = true; |
|
|
e.Handled = true; |
|
|
} |
|
|
} |
|
|
else if (IsDropDownOpen && e.Key == Key.Enter) |
|
|
else if (!IsDropDownOpen && (e.Key == Key.Enter || e.Key == Key.Space)) |
|
|
|
|
|
{ |
|
|
|
|
|
IsDropDownOpen = true; |
|
|
|
|
|
e.Handled = true; |
|
|
|
|
|
} |
|
|
|
|
|
else if (IsDropDownOpen && (e.Key == Key.Enter || e.Key == Key.Space)) |
|
|
{ |
|
|
{ |
|
|
SelectFocusedItem(); |
|
|
SelectFocusedItem(); |
|
|
IsDropDownOpen = false; |
|
|
IsDropDownOpen = false; |
|
|
|