Skip to content

Commit

Permalink
fixed the issue
Browse files Browse the repository at this point in the history
  • Loading branch information
a6ar55 committed Nov 4, 2023
1 parent 974a15e commit 322d21f
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions kolibri/core/assets/src/views/userAccounts/PasswordTextbox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,14 @@
this.$refs.password.focus();
},
checkErrorsAndSubmit(e) {
if (this.valid) {
this.$emit('submitNewPassword');
} else {
// Blurring will cause validation errors to show if needed
e.target.blur();
if (e.key === 'Enter') {
if (this.valid) {
this.$emit('submitNewPassword');
} else {
// Blurring will cause validation errors to show if needed
this.confirmationBlurred = true;
e.preventDefault(); // Prevent the default form submission
}
}
},
},
Expand Down

0 comments on commit 322d21f

Please sign in to comment.