diff --git a/src/components/mediaViewer/VideoPlayer.tsx b/src/components/mediaViewer/VideoPlayer.tsx index 061128189..9cbdc5e1b 100644 --- a/src/components/mediaViewer/VideoPlayer.tsx +++ b/src/components/mediaViewer/VideoPlayer.tsx @@ -120,7 +120,8 @@ const VideoPlayer: FC = ({ const handleVideoLeave = useLastCallback((e) => { const bounds = videoRef.current?.getBoundingClientRect(); if (!bounds) return; - if (e.clientX < bounds.left || e.clientX > bounds.right || e.clientY < bounds.top || e.clientY > bounds.bottom) { + if (e.clientX <= bounds.left || e.clientX >= bounds.right + || e.clientY <= bounds.top || e.clientY >= bounds.bottom) { toggleControls(false); } }); @@ -295,7 +296,7 @@ const VideoPlayer: FC = ({