From 74af4fd764c5f13c57a11e24502a2058596033fd Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Sun, 9 Feb 2020 15:07:07 +0000 Subject: [PATCH] disabled submit button be disabled --- .../secretstorage/AccessSecretStorageDialog.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/components/views/dialogs/secretstorage/AccessSecretStorageDialog.js b/src/components/views/dialogs/secretstorage/AccessSecretStorageDialog.js index 2d45398a3d..68ae8281c4 100644 --- a/src/components/views/dialogs/secretstorage/AccessSecretStorageDialog.js +++ b/src/components/views/dialogs/secretstorage/AccessSecretStorageDialog.js @@ -67,7 +67,9 @@ export default class AccessSecretStorageDialog extends React.PureComponent { }); } - _onPassPhraseNext = async () => { + _onPassPhraseNext = async (e) => { + e.preventDefault(); + if (this.state.passPhrase.length <= 0) return; this.setState({ keyMatches: null }); @@ -80,7 +82,9 @@ export default class AccessSecretStorageDialog extends React.PureComponent { } } - _onRecoveryKeyNext = async () => { + _onRecoveryKeyNext = async (e) => { + e.preventDefault(); + if (!this.state.recoveryKeyValid) return; this.setState({ keyMatches: null }); @@ -140,7 +144,7 @@ export default class AccessSecretStorageDialog extends React.PureComponent { "identity for verifying other sessions by entering your passphrase.", )}

-
+
@@ -215,7 +218,7 @@ export default class AccessSecretStorageDialog extends React.PureComponent { "identity for verifying other sessions by entering your recovery key.", )}

-
+