From 322d21fc09e38202b30da0b78da817babc5bf809 Mon Sep 17 00:00:00 2001 From: Adars T S <117556787+a6ar55@users.noreply.github.com> Date: Sat, 4 Nov 2023 13:29:48 +0530 Subject: [PATCH 1/2] fixed the issue --- .../src/views/userAccounts/PasswordTextbox.vue | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/kolibri/core/assets/src/views/userAccounts/PasswordTextbox.vue b/kolibri/core/assets/src/views/userAccounts/PasswordTextbox.vue index d27334f8a3b..082a1631b0a 100644 --- a/kolibri/core/assets/src/views/userAccounts/PasswordTextbox.vue +++ b/kolibri/core/assets/src/views/userAccounts/PasswordTextbox.vue @@ -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 + } } }, }, From 7e58d078a2e4f7b3f44689d78c22149ad4487749 Mon Sep 17 00:00:00 2001 From: Adars T S <117556787+a6ar55@users.noreply.github.com> Date: Sat, 11 Nov 2023 16:41:50 +0530 Subject: [PATCH 2/2] corrected the enter re-checking --- .../src/views/userAccounts/PasswordTextbox.vue | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/kolibri/core/assets/src/views/userAccounts/PasswordTextbox.vue b/kolibri/core/assets/src/views/userAccounts/PasswordTextbox.vue index 082a1631b0a..f2b9404b60e 100644 --- a/kolibri/core/assets/src/views/userAccounts/PasswordTextbox.vue +++ b/kolibri/core/assets/src/views/userAccounts/PasswordTextbox.vue @@ -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 } }, },