From d0ff93d435afabab4998748834c7147d155f02b3 Mon Sep 17 00:00:00 2001 From: SergeyEzhin Date: Wed, 15 Mar 2023 16:15:19 +0400 Subject: [PATCH] [common] For Bug 53974 --- apps/common/mobile/lib/view/Search.jsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/common/mobile/lib/view/Search.jsx b/apps/common/mobile/lib/view/Search.jsx index 7123cd6edf..a1f622cf08 100644 --- a/apps/common/mobile/lib/view/Search.jsx +++ b/apps/common/mobile/lib/view/Search.jsx @@ -87,6 +87,7 @@ class SearchView extends Component { replaceQuery: '' }; + this.refSearchbarInput = React.createRef(); this.onSettingsClick = this.onSettingsClick.bind(this); this.onSearchClick = this.onSearchClick.bind(this); this.onReplaceClick = this.onReplaceClick.bind(this); @@ -116,6 +117,9 @@ class SearchView extends Component { api.asc_selectSearchingResults(false); } }, + searchbarEnable: (sb) => { + this.refSearchbarInput.focus(); + } } }); } @@ -264,7 +268,7 @@ class SearchView extends Component {
this.onSearchKeyBoard(e)} - onChange={e => {this.changeSearchQuery(e.target.value)}} /> + onChange={e => {this.changeSearchQuery(e.target.value)}} ref={el => this.refSearchbarInput = el} /> {isIos ? : null} this.changeSearchQuery('')} />