Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Commit de8da0d

Browse files
Restoring more functionality
1 parent 943b3ab commit de8da0d

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/GitHub.UI/Controls/AutoCompleteBox/AutoCompleteBox.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -777,7 +777,7 @@ public override void OnApplyTemplate()
777777
{
778778
if (TextBox != null)
779779
{
780-
// UnsubscribeToEvent("PreviewKeyDown");
780+
UnsubscribeToEvent("PreviewKeyDown");
781781
}
782782

783783
if (DropDownPopup != null)
@@ -811,7 +811,7 @@ public override void OnApplyTemplate()
811811

812812
if (TextBox != null)
813813
{
814-
// SubscribeToEvent("PreviewKeyDown", TextBox.PreviewKeyDown.Subscribe(OnTextBoxPreviewKeyDown));
814+
SubscribeToEvent("PreviewKeyDown", TextBox.PreviewKeyDown.Subscribe(OnTextBoxPreviewKeyDown));
815815
}
816816

817817
Interaction.OnApplyTemplateBase();
@@ -899,9 +899,9 @@ private void RaiseExpandCollapseAutomationEvent(bool oldValue, bool newValue)
899899
/// Handles the PreviewKeyDown event on the TextBox for WPF.
900900
/// </summary>
901901
/// <param name="e">The event data.</param>
902-
private void OnTextBoxPreviewKeyDown(KeyEventArgs e)
902+
private void OnTextBoxPreviewKeyDown(EventPattern<KeyEventArgs> e)
903903
{
904-
OnKeyDown(e);
904+
OnKeyDown(e.EventArgs);
905905
}
906906

907907
/// <summary>
@@ -1521,10 +1521,10 @@ protected override void OnKeyDown(KeyEventArgs e)
15211521
// Standard drop down navigation
15221522
switch (e.Key)
15231523
{
1524-
case Key.F4:
1525-
IsDropDownOpen = !IsDropDownOpen;
1526-
e.Handled = true;
1527-
break;
1524+
// case Key.F4:
1525+
// IsDropDownOpen = !IsDropDownOpen;
1526+
// e.Handled = true;
1527+
// break;
15281528

15291529
case Key.Enter:
15301530
if (IsDropDownOpen && SelectedItem != null)

0 commit comments

Comments
 (0)