From 1bb89e18092d77d5f37f9df3a63a3ff98e725233 Mon Sep 17 00:00:00 2001 From: Mattermost Build Date: Thu, 17 Oct 2019 16:55:28 +0200 Subject: [PATCH] only focus search box when we enter through the search icon in navbar (#3433) --- app/screens/search/search.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/screens/search/search.js b/app/screens/search/search.js index 91b566181..288b57eb3 100644 --- a/app/screens/search/search.js +++ b/app/screens/search/search.js @@ -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) => { }, }; }); -