@@ -27,8 +27,6 @@ private void AutoSuggestBox_GettingFocus(UIElement sender, GettingFocusEventArgs
2727 if ( args . OldFocusedElement is null )
2828 return ;
2929
30- GlobalHelper . WriteDebugStringForOmnibar ( "The TextBox is getting the focus." ) ;
31-
3230 _previouslyFocusedElement = new ( args . OldFocusedElement as UIElement ) ;
3331 }
3432
@@ -44,8 +42,6 @@ private void AutoSuggestBox_LosingFocus(UIElement sender, LosingFocusEventArgs a
4442
4543 private void AutoSuggestBox_GotFocus ( object sender , RoutedEventArgs e )
4644 {
47- GlobalHelper . WriteDebugStringForOmnibar ( "The TextBox got the focus." ) ;
48-
4945 IsFocused = true ;
5046 _textBox . SelectAll ( ) ;
5147 }
@@ -56,8 +52,6 @@ private void AutoSuggestBox_LostFocus(object sender, RoutedEventArgs e)
5652 if ( _textBox . ContextFlyout . IsOpen )
5753 return ;
5854
59- GlobalHelper . WriteDebugStringForOmnibar ( "The TextBox lost the focus." ) ;
60-
6155 IsFocused = false ;
6256 }
6357
@@ -67,16 +61,12 @@ private async void AutoSuggestBox_KeyDown(object sender, KeyRoutedEventArgs e)
6761 {
6862 e . Handled = true ;
6963
70- GlobalHelper . WriteDebugStringForOmnibar ( "The TextBox accepted the Enter key." ) ;
71-
7264 SubmitQuery ( _textBoxSuggestionsPopup . IsOpen && _textBoxSuggestionsListView . SelectedIndex is not - 1 ? _textBoxSuggestionsListView . SelectedItem : null ) ;
7365 }
7466 else if ( ( e . Key == VirtualKey . Up || e . Key == VirtualKey . Down ) && _textBoxSuggestionsPopup . IsOpen )
7567 {
7668 e . Handled = true ;
7769
78- GlobalHelper . WriteDebugStringForOmnibar ( "The TextBox accepted the Up/Down key while the suggestions pop-up is open." ) ;
79-
8070 var currentIndex = _textBoxSuggestionsListView . SelectedIndex ;
8171 var nextIndex = currentIndex ;
8272 var suggestionsCount = _textBoxSuggestionsListView . Items . Count ;
@@ -105,8 +95,6 @@ private async void AutoSuggestBox_KeyDown(object sender, KeyRoutedEventArgs e)
10595 {
10696 e . Handled = true ;
10797
108- GlobalHelper . WriteDebugStringForOmnibar ( "The TextBox accepted the Esc key." ) ;
109-
11098 if ( _textBoxSuggestionsPopup . IsOpen )
11199 {
112100 RevertTextToUserInput ( ) ;
@@ -120,8 +108,6 @@ private async void AutoSuggestBox_KeyDown(object sender, KeyRoutedEventArgs e)
120108 }
121109 else if ( e . Key == VirtualKey . Tab && ! InputKeyboardSource . GetKeyStateForCurrentThread ( VirtualKey . Shift ) . HasFlag ( CoreVirtualKeyStates . Down ) )
122110 {
123- GlobalHelper . WriteDebugStringForOmnibar ( "The TextBox accepted the Tab key." ) ;
124-
125111 // Focus on inactive content when pressing Tab instead of moving to the next control in the tab order
126112 e . Handled = true ;
127113 IsFocused = false ;
@@ -156,7 +142,6 @@ private void AutoSuggestBox_TextChanged(object sender, TextChangedEventArgs e)
156142
157143 private void AutoSuggestBoxSuggestionsPopup_GettingFocus ( UIElement sender , GettingFocusEventArgs args )
158144 {
159- // The suggestions popup is never wanted to be focused when it come to open.
160145 args . TryCancel ( ) ;
161146 }
162147
0 commit comments