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