File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
digitransit-component/packages/digitransit-component-autosuggest/src Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -436,7 +436,7 @@ class DTAutosuggest extends React.Component {
436
436
renderMobileSearch : false ,
437
437
value : this . props . value ,
438
438
} ) ;
439
- if ( this . props . isMobile ) {
439
+ if ( this . props . isMobile && this . state . renderMobileSearch ) {
440
440
this . closeMobileSearch ( ) ;
441
441
}
442
442
} ;
@@ -504,7 +504,7 @@ class DTAutosuggest extends React.Component {
504
504
) {
505
505
this . props . focusChange ( ) ;
506
506
}
507
- if ( this . props . isMobile ) {
507
+ if ( this . props . isMobile && this . state . renderMobileSearch ) {
508
508
this . closeMobileSearch ( ) ;
509
509
}
510
510
} ,
@@ -561,7 +561,7 @@ class DTAutosuggest extends React.Component {
561
561
this . props . id ,
562
562
) ;
563
563
}
564
- if ( this . props . isMobile ) {
564
+ if ( this . props . isMobile && this . state . renderMobileSearch ) {
565
565
this . closeMobileSearch ( ) ;
566
566
}
567
567
if (
@@ -821,6 +821,7 @@ class DTAutosuggest extends React.Component {
821
821
this . onSuggestionsClearRequested ( ) ;
822
822
} ,
823
823
) ;
824
+ this . input . focus ( ) ;
824
825
} ;
825
826
826
827
keyDown = event => {
You can’t perform that action at this time.
0 commit comments