chore: close preview on esc key press (#1288)

This commit is contained in:
Alvaro Aleman 2021-02-16 11:15:04 -05:00 committed by GitHub
parent f1b7bd59f6
commit 977ec33918
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -177,6 +177,8 @@ export default {
if (this.hasNext) this.next()
} else if (event.which === 37) { // left arrow
if (this.hasPrevious) this.prev()
} else if (event.which === 27) { // esc
this.back()
}
},
async updatePreview () {