Skip to content

Commit

Permalink
fix: ignore shortcuts when viewer open
Browse files Browse the repository at this point in the history
  • Loading branch information
IITII committed Sep 16, 2023
1 parent 41504ac commit 21616d0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/components/pic_tools/ToolGroup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,12 @@ export default {
},
shortcut: function(event) {
const keyName = event.key
this.$log.debug(`keyName: ${keyName}`)
const viewer = document.getElementsByClassName('viewer-open')
if (viewer.length > 0) {
this.$log.debug('viewer-open, ignore shortcut')
return
}
for (const k in keymap) {
if (keymap[k].indexOf(keyName) >= 0) {
this.$log.debug(`find ${keyName} in keymap[${k}] -> ${keymap[k]}, call...`)
Expand Down

0 comments on commit 21616d0

Please sign in to comment.