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