diff --git a/src/components/views/dialogs/keybackup/CreateKeyBackupDialog.js b/src/components/views/dialogs/keybackup/CreateKeyBackupDialog.js
index aeb0c33b67..eec4c9f414 100644
--- a/src/components/views/dialogs/keybackup/CreateKeyBackupDialog.js
+++ b/src/components/views/dialogs/keybackup/CreateKeyBackupDialog.js
@@ -122,7 +122,7 @@ export default React.createClass({
},
_onPassPhraseKeyPress: function(e) {
- if (e.key === 'Enter') {
+ if (e.key === 'Enter' && this._passPhraseIsValid()) {
this._onPassPhraseNextClick();
}
},
@@ -136,7 +136,7 @@ export default React.createClass({
},
_onPassPhraseConfirmKeyPress: function(e) {
- if (e.key === 'Enter') {
+ if (e.key === 'Enter' && this.state.passPhrase === this.state.passPhraseConfirm) {
this._onPassPhraseConfirmNextClick();
}
},
@@ -167,6 +167,10 @@ export default React.createClass({
});
},
+ _passPhraseIsValid: function() {
+ return this.state.passPhrase !== '';
+ },
+
_renderPhasePassPhrase: function() {
const DialogButtons = sdk.getComponent('views.elements.DialogButtons');
const AccessibleButton = sdk.getComponent('elements.AccessibleButton');
@@ -187,7 +191,7 @@ export default React.createClass({
{_t(