Larasou
5 months ago
38
2
Vue

Close a modal with the escape key

Posted 5 months ago by Larasou

Good evening friends!

It's been a while that I search on the net a Vue.js directive that would allow me to close a modal when I press the key "Esc".

I tried full of directive like @ keyup.esc =" closeModalLogin ", @ keydown.esc =" closeModalLogin " etc ...

Do you have an idea ?

I'm using Tailwind CSS in my application

Please sign in or create an account to participate in this conversation.