diff --git a/src/components/views/dialogs/keybackup/RestoreKeyBackupDialog.js b/src/components/views/dialogs/keybackup/RestoreKeyBackupDialog.js index 814f5a4980..fc9a21c51b 100644 --- a/src/components/views/dialogs/keybackup/RestoreKeyBackupDialog.js +++ b/src/components/views/dialogs/keybackup/RestoreKeyBackupDialog.js @@ -22,7 +22,6 @@ import {MatrixClientPeg} from '../../../../MatrixClientPeg'; import { MatrixClient } from 'matrix-js-sdk'; import Modal from '../../../../Modal'; import { _t } from '../../../../languageHandler'; -import {Key} from "../../../../Keyboard"; import { accessSecretStorage } from '../../../../CrossSigningManager'; const RESTORE_TYPE_PASSPHRASE = 0; @@ -125,6 +124,8 @@ export default class RestoreKeyBackupDialog extends React.PureComponent { } _onRecoveryKeyNext = async () => { + if (!this.state.recoveryKeyValid) return; + this.setState({ loading: true, restoreError: null, @@ -157,12 +158,6 @@ export default class RestoreKeyBackupDialog extends React.PureComponent { }); } - _onRecoveryKeyKeyPress = (e) => { - if (e.key === Key.ENTER && this.state.recoveryKeyValid) { - this._onRecoveryKeyNext(); - } - } - async _restoreWithSecretStorage() { this.setState({ loading: true, @@ -366,7 +361,6 @@ export default class RestoreKeyBackupDialog extends React.PureComponent {