You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there a reason why the key-event for "escape" just works if the user first clicks inside the modal? I think it would be better if you have a global key event listener which closes you the latest modal.
Something like:
mounted() {
VuedalsBus.$on('opened', (modal) => {
if (modal.options.escapable) {
document.addEventListener('keydown', function dismissModal(event) {
if (event.keyCode === 27) {
VuedalsBus.$emit('close');
document.removeEventListener('keydown', dismissModal, true);
}
}, true);
}
});
},
The text was updated successfully, but these errors were encountered:
Is there a reason why the key-event for "escape" just works if the user first clicks inside the modal? I think it would be better if you have a global key event listener which closes you the latest modal.
Something like:
The text was updated successfully, but these errors were encountered: