only focus search box when we enter through the search icon in navbar (#3433)

This commit is contained in:
Mattermost Build 2019-10-17 16:55:28 +02:00 committed by Elias Nahum
parent e6e3fd23bf
commit 1bb89e1809

View file

@ -109,7 +109,7 @@ export default class Search extends PureComponent {
}
setTimeout(() => {
if (this.refs.searchBar) {
if (this.refs.searchBar && !this.props.initialValue) {
this.refs.searchBar.focus();
}
}, 150);
@ -840,4 +840,3 @@ const getStyleFromTheme = makeStyleSheetFromTheme((theme) => {
},
};
});