From 54df1dfcf7a4e2470eeb80e08407d02e8b32394c Mon Sep 17 00:00:00 2001 From: simon987 Date: Sat, 16 Apr 2022 13:51:36 -0400 Subject: [PATCH] Fix spacebar not working in search bar --- sist2-vue/src/components/Lightbox.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sist2-vue/src/components/Lightbox.vue b/sist2-vue/src/components/Lightbox.vue index ad7f954..d7b78ce 100644 --- a/sist2-vue/src/components/Lightbox.vue +++ b/sist2-vue/src/components/Lightbox.vue @@ -81,7 +81,9 @@ export default { methods: { keyDownListener(e) { - if (this.$refs.lightbox === undefined) { + const isLightboxOpen = this.$refs.lightbox === undefined || this.$refs.lightbox.$el.tagName === undefined; + + if (isLightboxOpen) { return true; }