File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -120,8 +120,14 @@ export function formChanged (oldQuery, newQuery) {
120
120
dispatch ( setMainPanelContent ( null ) )
121
121
}
122
122
123
- // Clear the current search and return to search screen on mobile when either location changes
124
- if ( isMobile ( ) && ( fromChanged || toChanged ) ) {
123
+ // Clear the current search and return to search screen on mobile when
124
+ // either location changes only if not currently on welcome screen (otherwise
125
+ // when the current position is auto-set the screen will change unexpectedly).
126
+ if (
127
+ isMobile ( ) &&
128
+ ( fromChanged || toChanged ) &&
129
+ otpState . ui . mobileScreen !== MobileScreens . WELCOME_SCREEN
130
+ ) {
125
131
dispatch ( clearActiveSearch ( ) )
126
132
dispatch ( setMobileScreen ( MobileScreens . SEARCH_FORM ) )
127
133
}
You can’t perform that action at this time.
0 commit comments