swap out keypress for keydown

This commit is contained in:
Bill Richardson 2024-05-13 16:22:44 -04:00
parent f5d46be983
commit a28f1f1cfb

View file

@ -6,7 +6,7 @@
tabindex="-1" tabindex="-1"
aria-labelledby="ModalComponentLabel" aria-labelledby="ModalComponentLabel"
aria-hidden="true" aria-hidden="true"
@keypress.enter="onEnter" @keydown.enter="onKeyDown"
v-on="{ v-on="{
'hidden.bs.modal': onModalClosed, 'hidden.bs.modal': onModalClosed,
'shown.bs.modal': onModalOpened 'shown.bs.modal': onModalOpened
@ -107,7 +107,7 @@ export default {
this.resetButtonStyle(); this.resetButtonStyle();
} }
}, },
async onEnter(e) { async onKeyDown(e) {
e.preventDefault(); e.preventDefault();
document.getElementById('modalbtn')?.focus(); document.getElementById('modalbtn')?.focus();
this.$refs.modalButtonMain.clicked(); this.$refs.modalButtonMain.clicked();