Skip to content

Commit

Permalink
corrected the enter re-checking
Browse files Browse the repository at this point in the history
  • Loading branch information
a6ar55 committed Nov 11, 2023
1 parent 322d21f commit 7e58d07
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions kolibri/core/assets/src/views/userAccounts/PasswordTextbox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -122,14 +122,12 @@
this.$refs.password.focus();
},
checkErrorsAndSubmit(e) {
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
}
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 7e58d07

Please sign in to comment.