Skip to content

Commit

Permalink
MM-22041 Fix Keyboard flashing when entering keyboards screen (matter…
Browse files Browse the repository at this point in the history
…most#4132)

* MM-22041 Fix Keyboard flashing when entering keyboards screen

* Update snapshots
  • Loading branch information
enahum authored Apr 9, 2020
1 parent 9d0209f commit 1486a55
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,6 @@ NotificationSettingsMentionsKeywords {
<TextInputWithLocalizedPlaceholder
autoCapitalize="none"
autoCorrect={false}
autoFocus={true}
blurOnSubmit={true}
keyboardAppearance="light"
multiline={true}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,16 @@ export default class NotificationSettingsMentionsKeywords extends PureComponent
this.navigationEventListener = Navigation.events().bindComponent(this);
}

componentDidAppear() {
if (this.keywordsInput) {
this.keywordsInput.focus();
}
}

componentDidDisappear() {
this.props.onBack(this.state.keywords);
}

handleSubmit = () => {
popTopScreen();
};
Expand All @@ -48,10 +58,6 @@ export default class NotificationSettingsMentionsKeywords extends PureComponent
return this.setState({keywords});
};

componentDidDisappear() {
this.props.onBack(this.state.keywords);
}

render() {
const {theme, isLandscape} = this.props;
const {keywords} = this.state;
Expand All @@ -66,7 +72,6 @@ export default class NotificationSettingsMentionsKeywords extends PureComponent
>
<View style={style.inputContainer}>
<TextInputWithLocalizedPlaceholder
autoFocus={true}
ref={this.keywordsRef}
value={keywords}
blurOnSubmit={true}
Expand Down

0 comments on commit 1486a55

Please sign in to comment.