remove scrollbar-gutter in fullscreen (#5258)
This commit is contained in:
parent
b37b64fb49
commit
c22492147b
1 changed files with 9 additions and 0 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue