Browse Source

Merge pull request #5107 from LBognanni/dont-steal-enter

AutoCompleteBox: Only handle the Enter key when the DropDown is open
pull/5112/head
Dan Walmsley 6 years ago
committed by GitHub
parent
commit
d3e3be667e
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  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