@@ -21,8 +21,6 @@ private void AutoSuggestBox_GettingFocus(UIElement sender, GettingFocusEventArgs
2121 if ( args . OldFocusedElement is null )
2222 return ;
2323
24- GlobalHelper . WriteDebugStringForOmnibar ( "The TextBox is getting the focus." ) ;
25-
2624 _previouslyFocusedElement = new ( args . OldFocusedElement as UIElement ) ;
2725 }
2826
@@ -38,8 +36,6 @@ private void AutoSuggestBox_LosingFocus(UIElement sender, LosingFocusEventArgs a
3836
3937 private void AutoSuggestBox_GotFocus ( object sender , RoutedEventArgs e )
4038 {
41- GlobalHelper . WriteDebugStringForOmnibar ( "The TextBox got the focus." ) ;
42-
4339 IsFocused = true ;
4440 _textBox . SelectAll ( ) ;
4541 }
@@ -50,8 +46,6 @@ private void AutoSuggestBox_LostFocus(object sender, RoutedEventArgs e)
5046 if ( _textBox . ContextFlyout . IsOpen )
5147 return ;
5248
53- GlobalHelper . WriteDebugStringForOmnibar ( "The TextBox lost the focus." ) ;
54-
5549 IsFocused = false ;
5650 }
5751
@@ -61,16 +55,12 @@ private async void AutoSuggestBox_KeyDown(object sender, KeyRoutedEventArgs e)
6155 {
6256 e . Handled = true ;
6357
64- GlobalHelper . WriteDebugStringForOmnibar ( "The TextBox accepted the Enter key." ) ;
65-
6658 SubmitQuery ( _textBoxSuggestionsPopup . IsOpen && _textBoxSuggestionsListView . SelectedIndex is not - 1 ? _textBoxSuggestionsListView . SelectedItem : null ) ;
6759 }
6860 else if ( ( e . Key == VirtualKey . Up || e . Key == VirtualKey . Down ) && _textBoxSuggestionsPopup . IsOpen )
6961 {
7062 e . Handled = true ;
7163
72- GlobalHelper . WriteDebugStringForOmnibar ( "The TextBox accepted the Up/Down key while the suggestions pop-up is open." ) ;
73-
7464 var currentIndex = _textBoxSuggestionsListView . SelectedIndex ;
7565 var nextIndex = currentIndex ;
7666 var suggestionsCount = _textBoxSuggestionsListView . Items . Count ;
@@ -99,8 +89,6 @@ private async void AutoSuggestBox_KeyDown(object sender, KeyRoutedEventArgs e)
9989 {
10090 e . Handled = true ;
10191
102- GlobalHelper . WriteDebugStringForOmnibar ( "The TextBox accepted the Esc key." ) ;
103-
10492 if ( _textBoxSuggestionsPopup . IsOpen )
10593 {
10694 RevertTextToUserInput ( ) ;
@@ -114,8 +102,6 @@ private async void AutoSuggestBox_KeyDown(object sender, KeyRoutedEventArgs e)
114102 }
115103 else if ( e . Key == VirtualKey . Tab && ! InputKeyboardSource . GetKeyStateForCurrentThread ( VirtualKey . Shift ) . HasFlag ( CoreVirtualKeyStates . Down ) )
116104 {
117- GlobalHelper . WriteDebugStringForOmnibar ( "The TextBox accepted the Tab key." ) ;
118-
119105 // Focus on inactive content when pressing Tab instead of moving to the next control in the tab order
120106 e . Handled = true ;
121107 IsFocused = false ;
@@ -150,7 +136,6 @@ private void AutoSuggestBox_TextChanged(object sender, TextChangedEventArgs e)
150136
151137 private void AutoSuggestBoxSuggestionsPopup_GettingFocus ( UIElement sender , GettingFocusEventArgs args )
152138 {
153- // The suggestions popup is never wanted to be focused when it come to open.
154139 args . TryCancel ( ) ;
155140 }
156141
0 commit comments