From cf9aa0d43d5b35549d6bb7b4a87605bd1f6f57bd Mon Sep 17 00:00:00 2001 From: Sneha Date: Thu, 7 Nov 2024 11:57:46 +0530 Subject: [PATCH] CSR-2308 --- src/digital-components/modal/modal.vue | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/digital-components/modal/modal.vue b/src/digital-components/modal/modal.vue index 3dc6e4afd..02164a05c 100644 --- a/src/digital-components/modal/modal.vue +++ b/src/digital-components/modal/modal.vue @@ -73,6 +73,11 @@ export default { resetForm, }; }, + data() { + return { + isEnterClicked: false, + }; + }, methods: { async validateAndEmit() { const validationResult = await this.validate(); @@ -84,9 +89,14 @@ export default { }, async onEnter(e) { e.preventDefault(); + if (this.isEnterClicked) return; + this.isEnterClicked = true; document.getElementById("modalbtn")?.focus(); this.$refs.modalButtonMain.clicked(); document.getElementById(this.modalId)?.focus(); + setTimeout(() => { + this.isEnterClicked = false; + }, 2000); }, resetButtonStyle() { this.$refs.modalButtonMain?.resetButtonStyle();