0👍
What I would do is validate the keypress, so like…
function logKey(e) {
if(e.code === "esc"){
// do something
}
}
https://developer.mozilla.org/en-US/docs/Web/Events/keypress
I haven’t used Vue but for sure it has that event. Haven’t tested it, by the way.
- [Vuejs]-VueJS SPA not loading properly on Microsoft Edge
- [Vuejs]-Npm install package throws error The operation was rejected by your operating system
Source:stackexchange.com