diff --git a/ui/src/components/WebRTCVideo.tsx b/ui/src/components/WebRTCVideo.tsx index ec392012..f8866e09 100644 --- a/ui/src/components/WebRTCVideo.tsx +++ b/ui/src/components/WebRTCVideo.tsx @@ -417,7 +417,7 @@ export default function WebRTCVideo({ hasConnectionIssues }: { hasConnectionIssu }); if (isRelativeMouseMode) { - videoElmRefValue.addEventListener("click", + containerRef.current?.addEventListener("click", () => { if (isPointerLockPossible && !isPointerLockActive && !document.pointerLockElement) { requestPointerLock();