diff --git a/src/pages/settings/AddSecondaryLoginPage.js b/src/pages/settings/AddSecondaryLoginPage.js index afffdb7cfdbd..fd3061adf5e2 100755 --- a/src/pages/settings/AddSecondaryLoginPage.js +++ b/src/pages/settings/AddSecondaryLoginPage.js @@ -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() { diff --git a/src/pages/settings/PasswordPage.js b/src/pages/settings/PasswordPage.js index 590d12b7a550..08a99d840ee7 100755 --- a/src/pages/settings/PasswordPage.js +++ b/src/pages/settings/PasswordPage.js @@ -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', diff --git a/src/pages/settings/Payments/AddPayPalMePage.js b/src/pages/settings/Payments/AddPayPalMePage.js index 8fd4d262a487..6b46d404eb88 100644 --- a/src/pages/settings/Payments/AddPayPalMePage.js +++ b/src/pages/settings/Payments/AddPayPalMePage.js @@ -39,6 +39,7 @@ class AddPayPalMePage extends React.Component { payPalMeUsernameError: false, }; this.setPayPalMeUsername = this.setPayPalMeUsername.bind(this); + this.focusPayPalMeInput = this.focusPayPalMeInput.bind(this); } /** @@ -57,9 +58,17 @@ class AddPayPalMePage extends React.Component { Navigation.navigate(ROUTES.SETTINGS_PAYMENTS); } + focusPayPalMeInput() { + if (!this.payPalMeInputRef) { + return; + } + + this.payPalMeInputRef.focus(); + } + render() { return ( - + this.payPalMeInputRef = el} label={this.props.translate('addPayPalMePage.payPalMe')} autoCompleteType="off" autoCorrect={false}