diff --git a/ui/app/pages/first-time-flow/create-password/import-with-seed-phrase/import-with-seed-phrase.component.js b/ui/app/pages/first-time-flow/create-password/import-with-seed-phrase/import-with-seed-phrase.component.js index e1c0b21ed6f4..1fae5351c08a 100644 --- a/ui/app/pages/first-time-flow/create-password/import-with-seed-phrase/import-with-seed-phrase.component.js +++ b/ui/app/pages/first-time-flow/create-password/import-with-seed-phrase/import-with-seed-phrase.component.js @@ -175,6 +175,12 @@ export default class ImportWithSeedPhrase extends PureComponent { return !passwordError && !confirmPasswordError && !seedPhraseError } + onTermsKeyPress = ({key}) => { + if (key === ' ' || key === 'Enter') { + this.toggleTermsCheck() + } + } + toggleTermsCheck = () => { this.context.metricsEvent({ eventOpts: { @@ -183,7 +189,6 @@ export default class ImportWithSeedPhrase extends PureComponent { name: 'Check ToS', }, }) - this.setState((prevState) => ({ termsChecked: !prevState.termsChecked, })) @@ -267,10 +272,17 @@ export default class ImportWithSeedPhrase extends PureComponent { largeLabel />
-
+
{termsChecked ? : null}
- + I have read and agree to the { - const { history } = this.props - - event.preventDefault() - history.push(INITIALIZE_IMPORT_WITH_SEED_PHRASE_ROUTE) - } - toggleTermsCheck = () => { this.context.metricsEvent({ eventOpts: { @@ -136,6 +128,12 @@ export default class NewAccount extends PureComponent { })) } + onTermsKeyPress = ({key}) => { + if (key === ' ' || key === 'Enter') { + this.toggleTermsCheck() + } + } + render () { const { t } = this.context const { password, confirmPassword, passwordError, confirmPasswordError, termsChecked } = this.state @@ -195,10 +193,17 @@ export default class NewAccount extends PureComponent { largeLabel />
-
+
{termsChecked ? : null}
- + I have read and agree to the