mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-05-01 19:17:41 +03:00
Ensure playback rate controls are portaled to the video container in history view
On larger tablets in landscape view, the playback rate dropdown disappeared underneath the bottom bar. This small change ensures we use the correct container on the DropdownMenuContent so that the div is portaled correctly. The VideoControls are also used in motion review which does not pass in a container ref, so we can just fall back to the existing controlsContainer ref when it's undefined.
This commit is contained in:
parent
ee368cca9c
commit
f4996ab4a5
@ -250,7 +250,9 @@ export default function VideoControls({
|
|||||||
>
|
>
|
||||||
<DropdownMenuTrigger>{`${playbackRate}x`}</DropdownMenuTrigger>
|
<DropdownMenuTrigger>{`${playbackRate}x`}</DropdownMenuTrigger>
|
||||||
<DropdownMenuContent
|
<DropdownMenuContent
|
||||||
portalProps={{ container: controlsContainerRef.current }}
|
portalProps={{
|
||||||
|
container: containerRef?.current ?? controlsContainerRef.current,
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
<DropdownMenuRadioGroup
|
<DropdownMenuRadioGroup
|
||||||
onValueChange={(rate) => onSetPlaybackRate(parseFloat(rate))}
|
onValueChange={(rate) => onSetPlaybackRate(parseFloat(rate))}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user