Skip to content

Commit

Permalink
Refactor #3351
Browse files Browse the repository at this point in the history
  • Loading branch information
tugcekucukoglu committed Dec 6, 2022
1 parent cc90d0c commit 4ab5689
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions src/components/image/Image.vue
Original file line number Diff line number Diff line change
Expand Up @@ -112,14 +112,19 @@ export default {
this.previewClick = false;
},
onMaskKeydown(event) {
if (event.code === 'Escape') {
this.onMaskClick();
setTimeout(() => {
DomHandler.focus(this.$refs.previewButton);
}, 25);
}
switch (event.code) {
case 'Escape':
this.onMaskClick();
setTimeout(() => {
DomHandler.focus(this.$refs.previewButton);
}, 25);
event.preventDefault();
event.preventDefault();
break;
default:
break;
}
},
onError() {
this.$emit('error');
Expand Down

0 comments on commit 4ab5689

Please sign in to comment.