MM-22041 Fix Keyboard flashing when entering keyboards screen (#4132)

* MM-22041 Fix Keyboard flashing when entering keyboards screen

* Update snapshots
This commit is contained in:
Elias Nahum 2020-04-09 06:10:46 -04:00 committed by GitHub
parent 9d0209fce6
commit 1486a55aeb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 6 deletions

View file

@ -193,7 +193,6 @@ NotificationSettingsMentionsKeywords {
<TextInputWithLocalizedPlaceholder
autoCapitalize="none"
autoCorrect={false}
autoFocus={true}
blurOnSubmit={true}
keyboardAppearance="light"
multiline={true}

View file

@ -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();
};
@ -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;
@ -66,7 +72,6 @@ export default class NotificationSettingsMentionsKeywords extends PureComponent
>
<View style={style.inputContainer}>
<TextInputWithLocalizedPlaceholder
autoFocus={true}
ref={this.keywordsRef}
value={keywords}
blurOnSubmit={true}