remove scrollbar-gutter in fullscreen (#5258)

zio/stable
Samuel Newman 2024-09-10 23:18:08 +01:00 committed by GitHub
parent b37b64fb49
commit c22492147b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 9 additions and 0 deletions

View File

@ -95,6 +95,15 @@ export function Controls({
} }
}, [interactingViaKeypress]) }, [interactingViaKeypress])
useEffect(() => {
if (isFullscreen) {
document.documentElement.style.scrollbarGutter = 'unset'
return () => {
document.documentElement.style.removeProperty('scrollbar-gutter')
}
}
}, [isFullscreen])
// pause + unfocus when another video is active // pause + unfocus when another video is active
useEffect(() => { useEffect(() => {
if (!active) { if (!active) {