CSR-1710
This commit is contained in:
parent
c5f3d2a500
commit
f9b7d66e1a
3 changed files with 7 additions and 16 deletions
|
|
@ -6,6 +6,7 @@
|
|||
:id="modalId"
|
||||
tabindex="-1"
|
||||
aria-labelledby="ModalComponentLabel"
|
||||
@keypress.enter="onEnter"
|
||||
aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-centered">
|
||||
<div class="modal-content">
|
||||
|
|
@ -81,6 +82,12 @@ export default {
|
|||
this.resetButtonStyle();
|
||||
}
|
||||
},
|
||||
async onEnter(e) {
|
||||
e.preventDefault();
|
||||
document.getElementById("modalbtn")?.focus();
|
||||
this.$refs.modalButtonMain.clicked();
|
||||
document.getElementById(this.modalId)?.focus();
|
||||
},
|
||||
resetButtonStyle() {
|
||||
this.$refs.modalButtonMain.resetButtonStyle();
|
||||
},
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@
|
|||
:headerText="modalHeaderText"
|
||||
:onModalClosedCallback="onModalClosed"
|
||||
:onModalOpenedCallback="focusOnPromoInput"
|
||||
@keypress.enter="onEnter"
|
||||
:footerButtonText="modalFooterText"
|
||||
@footer-button-event="addPromoCode">
|
||||
<promoQuestion
|
||||
|
|
@ -163,10 +162,6 @@ export default {
|
|||
openModal() {
|
||||
this.modal.openModal();
|
||||
},
|
||||
onEnter(e) {
|
||||
e.preventDefault();
|
||||
this.modal.validateAndEmit();
|
||||
},
|
||||
closeModal() {
|
||||
this.modal.closeModal();
|
||||
},
|
||||
|
|
|
|||
|
|
@ -19,7 +19,6 @@
|
|||
:onModalOpenedCallback="onModalOpened"
|
||||
:onModalClosedCallback="onModalClosed"
|
||||
:footerButtonText="modalFooterText"
|
||||
@keypress.enter="onEnter"
|
||||
@footer-button-event="setZipCode">
|
||||
<serviceZipQuestion
|
||||
ref="serviceZipQuestion"
|
||||
|
|
@ -109,10 +108,6 @@ export default {
|
|||
const input = document.getElementById(this.serviceZipCodeTextInputId);
|
||||
input?.focus();
|
||||
},
|
||||
focusOnModalButton() {
|
||||
const modalButton = document.getElementById("modalbtn");
|
||||
modalButton?.focus();
|
||||
},
|
||||
copyModel(modelToCopy) {
|
||||
return {
|
||||
state: modelToCopy.state,
|
||||
|
|
@ -122,12 +117,6 @@ export default {
|
|||
openModal() {
|
||||
this.modal.openModal();
|
||||
},
|
||||
onEnter(e) {
|
||||
e.preventDefault();
|
||||
this.focusOnModalButton();
|
||||
this.modal.validateAndEmit();
|
||||
this.focusOnZipInput();
|
||||
},
|
||||
closeModal() {
|
||||
this.modal.closeModal();
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue