about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorSamuel Newman <mozzius@protonmail.com>2024-09-10 23:18:08 +0100
committerGitHub <noreply@github.com>2024-09-10 23:18:08 +0100
commitc22492147b8b5904ceb205b87d0852ffcf4c8d24 (patch)
tree3b2b0a59ab0dd13b1eb5caa0563c7ca6ffb0c47d /src
parentb37b64fb49bd77597ac9b4aa239edc3f05bfd0e0 (diff)
downloadvoidsky-c22492147b8b5904ceb205b87d0852ffcf4c8d24.tar.zst
remove scrollbar-gutter in fullscreen (#5258)
Diffstat (limited to 'src')
-rw-r--r--src/view/com/util/post-embeds/VideoEmbedInner/VideoWebControls.tsx9
1 files changed, 9 insertions, 0 deletions
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) {