From ea0de43ad6c136fad279cad70a23a068af1e6f2c Mon Sep 17 00:00:00 2001 From: Georg krause Date: Wed, 3 May 2023 14:20:15 +0200 Subject: [PATCH] fix(2054): Crash on opening a play button menu Part-of: --- front/src/components/audio/PlayButton.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/front/src/components/audio/PlayButton.vue b/front/src/components/audio/PlayButton.vue index 2c561eeae..b4a460c39 100644 --- a/front/src/components/audio/PlayButton.vue +++ b/front/src/components/audio/PlayButton.vue @@ -105,7 +105,7 @@ const openMenu = () => { // little magic to ensure the menu is always visible in the viewport // By default, try to display it on the right if there is enough room const menu = dropdown.value.find('.menu') - if (menu.classList.includes('visible')) return + if (menu.hasClass('visible')) return const viewportOffset = menu.get(0)?.getBoundingClientRect() ?? { right: 0, left: 0 } const viewportWidth = document.documentElement.clientWidth const rightOverflow = viewportOffset.right - viewportWidth