feat: close editor when click escape key (#2947)

pull/2948/head^2
Shlomo 2024-01-30 11:29:37 +02:00 committed by GitHub
parent 2f6c473977
commit 70c826133b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 0 deletions

View File

@ -110,6 +110,10 @@ export default {
this.$router.push({ path: uri });
},
keyEvent(event) {
if (event.code === "Escape") {
this.close();
}
if (!event.ctrlKey && !event.metaKey) {
return;
}