@@ -114,8 +114,7 @@ protected void ChangeMode(OmnibarMode? oldMode, OmnibarMode newMode)
114114 // Add the reposition transition to the all modes
115115 mode . Transitions = [ new RepositionThemeTransition ( ) ] ;
116116 mode . UpdateLayout ( ) ;
117-
118- mode . OnChangingCurrentMode ( false ) ;
117+ mode . IsTabStop = true ;
119118 }
120119
121120 var index = _modesHostGrid . Children . IndexOf ( newMode ) ;
@@ -145,24 +144,30 @@ protected void ChangeMode(OmnibarMode? oldMode, OmnibarMode newMode)
145144 ChangeTextBoxText ( newMode . Text ?? string . Empty ) ;
146145
147146 VisualStateManager . GoToState ( newMode , "Focused" , true ) ;
148- newMode . OnChangingCurrentMode ( true ) ;
149-
150- if ( IsFocused )
151- {
152- VisualStateManager . GoToState ( newMode , "Focused" , true ) ;
153- VisualStateManager . GoToState ( _textBox , "InputAreaVisible" , true ) ;
154- }
155- else if ( newMode ? . ContentOnInactive is not null )
147+ newMode . IsTabStop = false ;
148+ if ( newMode . IsAutoFocusEnabled )
156149 {
157- VisualStateManager . GoToState ( newMode , "CurrentUnfocused" , true ) ;
158- VisualStateManager . GoToState ( _textBox , "InputAreaCollapsed" , true ) ;
150+ _textBox . Focus ( FocusState . Pointer ) ;
159151 }
160152 else
161153 {
162- VisualStateManager . GoToState ( _textBox , "InputAreaVisible" , true ) ;
163- }
154+ if ( IsFocused )
155+ {
156+ VisualStateManager . GoToState ( newMode , "Focused" , true ) ;
157+ VisualStateManager . GoToState ( _textBox , "InputAreaVisible" , true ) ;
158+ }
159+ else if ( newMode ? . ContentOnInactive is not null )
160+ {
161+ VisualStateManager . GoToState ( newMode , "CurrentUnfocused" , true ) ;
162+ VisualStateManager . GoToState ( _textBox , "InputAreaCollapsed" , true ) ;
163+ }
164+ else
165+ {
166+ VisualStateManager . GoToState ( _textBox , "InputAreaVisible" , true ) ;
167+ }
164168
165- TryToggleIsSuggestionsPopupOpen ( IsFocused && newMode ? . SuggestionItemsSource is not null ) ;
169+ TryToggleIsSuggestionsPopupOpen ( true ) ;
170+ }
166171
167172 // Remove the reposition transition from the all modes
168173 foreach ( var mode in Modes )
0 commit comments