Merge pull request #2080 from Safelite/feature/CSR-2308

CSR-2308
This commit is contained in:
AMSNEHA 2024-11-07 15:41:51 +05:30 committed by GitHub
commit ca4e136bca
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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();