diff --git a/src/components/views/auth/PasswordLogin.js b/src/components/views/auth/PasswordLogin.js index fb14629214..1ad93f6075 100644 --- a/src/components/views/auth/PasswordLogin.js +++ b/src/components/views/auth/PasswordLogin.js @@ -58,6 +58,7 @@ class PasswordLogin extends React.Component { loginType: PasswordLogin.LOGIN_FIELD_MXID, }; + this.onForgotPasswordClick = this.onForgotPasswordClick.bind(this); this.onSubmitForm = this.onSubmitForm.bind(this); this.onUsernameChanged = this.onUsernameChanged.bind(this); this.onUsernameBlur = this.onUsernameBlur.bind(this); @@ -74,6 +75,12 @@ class PasswordLogin extends React.Component { this._loginField = null; } + onForgotPasswordClick(ev) { + ev.preventDefault(); + ev.stopPropagation(); + this.props.onForgotPasswordClick(); + } + onSubmitForm(ev) { ev.preventDefault(); @@ -244,7 +251,7 @@ class PasswordLogin extends React.Component { forgotPasswordJsx = {_t('Not sure of your password? Set a new one', {}, { a: sub => {sub}