Browse Source

Only handle the Enter key when the DropDown is open

Fixes #5106
pull/5107/head
Loris Bognanni 5 years ago
parent
commit
0cb25c78c9
  1. 7
      src/Avalonia.Controls/AutoCompleteBox.cs

7
src/Avalonia.Controls/AutoCompleteBox.cs

@ -1405,8 +1405,11 @@ namespace Avalonia.Controls
break;
case Key.Enter:
OnAdapterSelectionComplete(this, new RoutedEventArgs());
e.Handled = true;
if (IsDropDownOpen)
{
OnAdapterSelectionComplete(this, new RoutedEventArgs());
e.Handled = true;
}
break;
default:

Loading…
Cancel
Save