diff options
author | Samuel Newman <mozzius@protonmail.com> | 2024-09-10 23:18:08 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-10 23:18:08 +0100 |
commit | c22492147b8b5904ceb205b87d0852ffcf4c8d24 (patch) | |
tree | 3b2b0a59ab0dd13b1eb5caa0563c7ca6ffb0c47d /src | |
parent | b37b64fb49bd77597ac9b4aa239edc3f05bfd0e0 (diff) | |
download | voidsky-c22492147b8b5904ceb205b87d0852ffcf4c8d24.tar.zst |
remove scrollbar-gutter in fullscreen (#5258)
Diffstat (limited to 'src')
-rw-r--r-- | src/view/com/util/post-embeds/VideoEmbedInner/VideoWebControls.tsx | 9 |
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) { |