From 70c826133b8578b8712e6db8f762a15a076cd9a9 Mon Sep 17 00:00:00 2001 From: Shlomo <78599753+ShlomoCode@users.noreply.github.com> Date: Tue, 30 Jan 2024 11:29:37 +0200 Subject: [PATCH] feat: close editor when click escape key (#2947) --- frontend/src/views/files/Editor.vue | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/frontend/src/views/files/Editor.vue b/frontend/src/views/files/Editor.vue index 56d34065..7b8aace3 100644 --- a/frontend/src/views/files/Editor.vue +++ b/frontend/src/views/files/Editor.vue @@ -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; }