Fix keyboard search

This commit is contained in:
Andrey Shimagin 2022-04-01 14:39:20 +03:00
parent 4341ea35c9
commit fe43be62af

View file

@ -233,6 +233,12 @@ class SearchView extends Component {
replaceQuery: value
});
}
onSearchKeyBoard(event) {
if(event.keyCode === 13) {
this.props.onSearchQuery(this.searchParams());
}
}
render() {
const usereplace = searchOptions.usereplace;
@ -258,7 +264,8 @@ class SearchView extends Component {
</div>
<div className="searchbar-inner__center">
<div className="searchbar-input-wrap">
<input className="searchbar-input" value={searchQuery} placeholder={_t.textSearch} type="text" maxLength="255"
<input className="searchbar-input" value={searchQuery} placeholder={_t.textSearch} type="search" maxLength="255"
onKeyDown={e => this.onSearchKeyBoard(e)}
onChange={e => {this.changeSearchQuery(e.target.value)}} />
{isIos ? <i className="searchbar-icon" /> : null}
<span className="input-clear-button" onClick={() => this.changeSearchQuery('')} />