Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions src/pages/settings/AddSecondaryLoginPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@ class AddSecondaryLoginPage extends Component {
this.submitForm = this.submitForm.bind(this);
this.onSecondaryLoginChange = this.onSecondaryLoginChange.bind(this);
this.validateForm = this.validateForm.bind(this);

this.phoneNumberInputRef = null;
}

componentWillUnmount() {
Expand Down
1 change: 0 additions & 1 deletion src/pages/settings/PasswordPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ class PasswordPage extends Component {
this.getErrorText = this.getErrorText.bind(this);
this.validate = this.validate.bind(this);
this.clearErrorAndSetValue = this.clearErrorAndSetValue.bind(this);
this.currentPasswordInputRef = null;

this.errorKeysMap = {
currentPassword: 'passwordPage.errors.currentPassword',
Expand Down
12 changes: 11 additions & 1 deletion src/pages/settings/Payments/AddPayPalMePage.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ class AddPayPalMePage extends React.Component {
payPalMeUsernameError: false,
};
this.setPayPalMeUsername = this.setPayPalMeUsername.bind(this);
this.focusPayPalMeInput = this.focusPayPalMeInput.bind(this);
}

/**
Expand All @@ -57,9 +58,17 @@ class AddPayPalMePage extends React.Component {
Navigation.navigate(ROUTES.SETTINGS_PAYMENTS);
}

focusPayPalMeInput() {
if (!this.payPalMeInputRef) {
return;
}

this.payPalMeInputRef.focus();
}

render() {
return (
<ScreenWrapper>
<ScreenWrapper onTransitionEnd={this.focusPayPalMeInput}>
<HeaderWithCloseButton
title={this.props.translate('common.payPalMe')}
shouldShowBackButton
Expand All @@ -72,6 +81,7 @@ class AddPayPalMePage extends React.Component {
{this.props.translate('addPayPalMePage.enterYourUsernameToGetPaidViaPayPal')}
</Text>
<TextInput
ref={el => this.payPalMeInputRef = el}
label={this.props.translate('addPayPalMePage.payPalMe')}
autoCompleteType="off"
autoCorrect={false}
Expand Down