From de12fe78516e9d2495e9f246635a17392e6bcd5e Mon Sep 17 00:00:00 2001 From: Eduard Gert Date: Thu, 18 Jun 2026 14:46:32 +0200 Subject: [PATCH] fix slide animation --- .../src/modules/main/advanced/peers/PeerDetailPanel.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/client/ui/frontend/src/modules/main/advanced/peers/PeerDetailPanel.tsx b/client/ui/frontend/src/modules/main/advanced/peers/PeerDetailPanel.tsx index 052ff90ed..0bb9a0c17 100644 --- a/client/ui/frontend/src/modules/main/advanced/peers/PeerDetailPanel.tsx +++ b/client/ui/frontend/src/modules/main/advanced/peers/PeerDetailPanel.tsx @@ -124,7 +124,9 @@ export const PeerDetailPanel = ({ transition = DEFAULT_TRANSITION }: Props) => { useEffect(() => { if (!selected) return; // Defer focus until the slide-in animation has started rendering. - requestAnimationFrame(() => backButtonRef.current?.focus()); + // preventScroll avoids the browser scrolling the parent to chase the + // still-offscreen button, which lands as a stutter at the end of the slide. + requestAnimationFrame(() => backButtonRef.current?.focus({ preventScroll: true })); // eslint-disable-next-line react-hooks/exhaustive-deps }, [selected?.pubKey]); @@ -170,6 +172,7 @@ export const PeerDetailPanel = ({ transition = DEFAULT_TRANSITION }: Props) => { animate={{ x: 0 }} exit={{ x: "100%" }} transition={transition} + style={{ willChange: "transform" }} className={cn("absolute inset-0 z-20 flex flex-col", "bg-nb-gray-940")} >