Fix search auto focus on iOS (#1176)
This commit is contained in:
parent
8b08a44820
commit
ee3f0500f2
1 changed files with 7 additions and 1 deletions
|
|
@ -137,7 +137,12 @@ export default class Search extends Component {
|
|||
};
|
||||
|
||||
focus = () => {
|
||||
this.refs.input_keyword.getNode().focus();
|
||||
InteractionManager.runAfterInteractions(() => {
|
||||
const input = this.refs.input_keyword.getNode();
|
||||
if (!input.isFocused()) {
|
||||
input.focus();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
onBlur = () => {
|
||||
|
|
@ -198,6 +203,7 @@ export default class Search extends Component {
|
|||
duration: 200
|
||||
}
|
||||
).start();
|
||||
this.focus();
|
||||
|
||||
if (this.props.onDelete) {
|
||||
this.props.onDelete();
|
||||
|
|
|
|||
Loading…
Reference in a new issue