From fed05f23968860a65368e0d465a3f432d1c108b6 Mon Sep 17 00:00:00 2001 From: lebaudantoine Date: Tue, 6 Jan 2026 23:30:21 +0100 Subject: [PATCH] =?UTF-8?q?=E2=99=BF=EF=B8=8F(frontend)=20fix=20jump=20and?= =?UTF-8?q?=20animation=20break=20on=20panel=20open=20with=20auto-focus?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit used requestAnimationFrame and preventScroll to preserve smooth transition Signed-off-by: Cyril --- .../src/features/recording/components/ControlsButton.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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(null) useEffect(() => { - primaryActionRef.current?.focus() + requestAnimationFrame(() => { + if (primaryActionRef.current) { + primaryActionRef.current.focus({ preventScroll: true }) + } + }) }, []) const room = useRoomContext()