remove scrollbar-gutter in fullscreen (#5258)
parent
b37b64fb49
commit
c22492147b
|
@ -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) {
|
||||||
|
|
Loading…
Reference in New Issue