Skip to content

Commit

Permalink
feat: close editor when click escape key (#2947)
Browse files Browse the repository at this point in the history
  • Loading branch information
ShlomoCode committed Jan 30, 2024
1 parent 2f6c473 commit 70c8261
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions frontend/src/views/files/Editor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 70c8261

Please sign in to comment.