Skip to content

Commit

Permalink
Autofocus fix
Browse files Browse the repository at this point in the history
  • Loading branch information
MaciejSWM committed Sep 15, 2023
1 parent 5d28fdb commit 70beac8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/components/OptionsSelector/BaseOptionsSelector.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,14 @@ class BaseOptionsSelector extends Component {
}
}

// Screen coming back into focus, for example
// when doing Cmd+Shift+K, then Cmd+K, then Cmd+Shift+K
if (!prevProps.isFocused && this.props.isFocused && this.props.autoFocus) {
setTimeout(() => {
this.textInput.focus();
}, CONST.ANIMATED_TRANSITION)
}

if (_.isEqual(this.props.sections, prevProps.sections)) {
return;
}
Expand Down

0 comments on commit 70beac8

Please sign in to comment.