From dd7b9ddd8546361060ef99e838a691b2fc6c495a Mon Sep 17 00:00:00 2001 From: Ramires Viana <59319979+ramiresviana@users.noreply.github.com> Date: Tue, 29 Sep 2020 14:04:55 +0000 Subject: [PATCH] fix: preview key shortcut conflict --- frontend/src/components/files/Preview.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/files/Preview.vue b/frontend/src/components/files/Preview.vue index 7a2ded1b..0ae10e32 100644 --- a/frontend/src/components/files/Preview.vue +++ b/frontend/src/components/files/Preview.vue @@ -103,7 +103,7 @@ export default { } }, computed: { - ...mapState(['req', 'user', 'oldReq', 'jwt', 'loading']), + ...mapState(['req', 'user', 'oldReq', 'jwt', 'loading', 'show']), hasPrevious () { return (this.previousLink !== '') }, @@ -159,6 +159,10 @@ export default { key (event) { event.preventDefault() + if (this.show !== null) { + return + } + if (event.which === 13 || event.which === 39) { // right arrow if (this.hasNext) this.next() } else if (event.which === 37) { // left arrow