From 39bcf8c270422027f0c3ed6d074fa0419b74bc42 Mon Sep 17 00:00:00 2001 From: qtchaos <72168435+qtchaos@users.noreply.github.com> Date: Fri, 22 Mar 2024 17:42:18 +0200 Subject: [PATCH] fix: add overflow-y-hidden for mac users --- src/components/player/atoms/Volume.tsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/components/player/atoms/Volume.tsx b/src/components/player/atoms/Volume.tsx index 6f97a14f..62662de1 100644 --- a/src/components/player/atoms/Volume.tsx +++ b/src/components/player/atoms/Volume.tsx @@ -41,8 +41,13 @@ export function Volume(props: Props) { const handleMouseEnter = useCallback(async () => { if (await canChangeVolume()) setHovering(true); + document.body.classList.add("overflow-y-hidden"); }, [setHovering]); + const handleMouseLeave = () => { + document.body.classList.remove("overflow-y-hidden"); + }; + let percentage = makePercentage(volume * 100); if (dragging) percentage = makePercentage(dragPercentage); const percentageString = makePercentageString(percentage); @@ -61,6 +66,7 @@ export function Volume(props: Props) {