fix: prompt key shortcut conflict

This commit is contained in:
Ramires Viana
2020-07-04 14:19:03 +00:00
parent de0b8bb7b2
commit 0d69fbd9a3
3 changed files with 24 additions and 18 deletions

View File

@@ -61,7 +61,8 @@ export default {
'user',
'reload',
'multiple',
'loading'
'loading',
'show'
]),
isPreview () {
return !this.loading && !this.isListing && !this.isEditor
@@ -158,10 +159,17 @@ export default {
}
},
keyEvent (event) {
// Esc!
if (event.keyCode === 27) {
this.$store.commit('closeHovers')
if (this.show !== null) {
// Esc!
if (event.keyCode === 27) {
this.$store.commit('closeHovers')
}
return
}
// Esc!
if (event.keyCode === 27) {
// If we're on a listing, unselect all
// files and folders.
if (this.isListing) {