Skip to content

armgit / meet

Public Imported from GitHub
0

Open source video conferencing app powered by LiveKit. Built with Django and React.

♿️(frontend) fix jump and animation break on panel open with auto-focus

lebaudantoinefed05f239688
diff --git a/src/frontend/src/features/recording/components/ControlsButton.tsx b/src/frontend/src/features/recording/components/ControlsButton.tsx
index 6721bb2c..94e72aa9 100644
--- a/src/frontend/src/features/recording/components/ControlsButton.tsx
+++ b/src/frontend/src/features/recording/components/ControlsButton.tsx
@@ -46,7 +46,11 @@ export const ControlsButton = ({
const primaryActionRef = useRef<HTMLButtonElement | null>(null)
useEffect(() => {
- primaryActionRef.current?.focus()
+ requestAnimationFrame(() => {
+ if (primaryActionRef.current) {
+ primaryActionRef.current.focus({ preventScroll: true })
+ }
+ })
}, [])
const room = useRoomContext()