diff --git a/stubs/inertia/resources/js/Components/Modal.vue b/stubs/inertia/resources/js/Components/Modal.vue index 0779f457..319d3cc5 100644 --- a/stubs/inertia/resources/js/Components/Modal.vue +++ b/stubs/inertia/resources/js/Components/Modal.vue @@ -41,8 +41,12 @@ const close = () => { }; const closeOnEscape = (e) => { - if (e.key === 'Escape' && props.show) { - close(); + if (e.key === 'Escape') { + e.preventDefault(); + + if (props.show) { + close(); + } } };