diff --git a/src/digital-components/modal/modal.vue b/src/digital-components/modal/modal.vue
index f5c9a221..20c202bb 100644
--- a/src/digital-components/modal/modal.vue
+++ b/src/digital-components/modal/modal.vue
@@ -20,6 +20,7 @@
type="button"
class="btn-close"
@mousedown="closeModal"
+ @keypress.space="closeModal"
aria-label="Close">
diff --git a/src/digital-components/textbox-question/textbox-question.vue b/src/digital-components/textbox-question/textbox-question.vue
index 774d0025..e13f5c4b 100644
--- a/src/digital-components/textbox-question/textbox-question.vue
+++ b/src/digital-components/textbox-question/textbox-question.vue
@@ -16,7 +16,7 @@
class="form-control"
v-model.trim="value"
v-maska="mask"
- v-on:focus="blurInput"
+ @keydown="preventDateInput"
:type="type"
:ref="inputId"
:id="inputId"
@@ -139,11 +139,15 @@ export default {
},
- blurInput() {
- if (this.$refs.dateOfLossField) {
- this.$refs.dateOfLossField.blur();
- }
- }
+ preventDateInput(evt) {
+ if (this.type === "date") {
+ if (/\d/.test(evt.key)) {
+ evt.stopPropagation();
+ evt.preventDefault();
+ return false;
+ }
+ }
+ }
},
computed: {