Skip to content

Commit

Permalink
remove scrollbar-gutter in fullscreen (#5258)
Browse files Browse the repository at this point in the history
  • Loading branch information
mozzius authored Sep 10, 2024
1 parent b37b64f commit c224921
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit c224921

Please sign in to comment.