sprinkle preventDefaults on form submission handlers

pull/21833/head
Michael Telatynski 2020-02-09 15:03:28 +00:00
parent 0393a57b5a
commit 2230e746aa
1 changed files with 6 additions and 2 deletions

View File

@ -289,7 +289,9 @@ export default class CreateSecretStorageDialog extends React.PureComponent {
}); });
} }
_onPassPhraseNextClick = async () => { _onPassPhraseNextClick = async (e) => {
e.preventDefault();
// If we're waiting for the timeout before updating the result at this point, // If we're waiting for the timeout before updating the result at this point,
// skip ahead and do it now, otherwise we'll deny the attempt to proceed // skip ahead and do it now, otherwise we'll deny the attempt to proceed
// even if the user entered a valid passphrase // even if the user entered a valid passphrase
@ -307,7 +309,9 @@ export default class CreateSecretStorageDialog extends React.PureComponent {
} }
}; };
_onPassPhraseConfirmNextClick = async () => { _onPassPhraseConfirmNextClick = async (e) => {
e.preventDefault();
if (this.state.passPhrase !== this.state.passPhraseConfirm) return; if (this.state.passPhrase !== this.state.passPhraseConfirm) return;
const [keyInfo, encodedRecoveryKey] = const [keyInfo, encodedRecoveryKey] =