From c22492147b8b5904ceb205b87d0852ffcf4c8d24 Mon Sep 17 00:00:00 2001
From: Samuel Newman <mozzius@protonmail.com>
Date: Tue, 10 Sep 2024 23:18:08 +0100
Subject: remove scrollbar-gutter in fullscreen (#5258)

---
 .../com/util/post-embeds/VideoEmbedInner/VideoWebControls.tsx    | 9 +++++++++
 1 file changed, 9 insertions(+)

(limited to 'src/view/com/util/post-embeds/VideoEmbedInner/VideoWebControls.tsx')

diff --git a/src/view/com/util/post-embeds/VideoEmbedInner/VideoWebControls.tsx b/src/view/com/util/post-embeds/VideoEmbedInner/VideoWebControls.tsx
index a12d04db6..e9005a37e 100644
--- a/src/view/com/util/post-embeds/VideoEmbedInner/VideoWebControls.tsx
+++ b/src/view/com/util/post-embeds/VideoEmbedInner/VideoWebControls.tsx
@@ -95,6 +95,15 @@ export function Controls({
     }
   }, [interactingViaKeypress])
 
+  useEffect(() => {
+    if (isFullscreen) {
+      document.documentElement.style.scrollbarGutter = 'unset'
+      return () => {
+        document.documentElement.style.removeProperty('scrollbar-gutter')
+      }
+    }
+  }, [isFullscreen])
+
   // pause + unfocus when another video is active
   useEffect(() => {
     if (!active) {
-- 
cgit 1.4.1

