From 0a1232f460762acfd51e2f88430a8843dfeba056 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?marcin=20miko=C5=82ajczak?= Date: Fri, 16 Aug 2024 09:33:04 +0200 Subject: [PATCH] Change sidebar menu transition MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: marcin mikołajczak --- src/components/sidebar-menu.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/sidebar-menu.tsx b/src/components/sidebar-menu.tsx index d5de9b45e7..641412c208 100644 --- a/src/components/sidebar-menu.tsx +++ b/src/components/sidebar-menu.tsx @@ -149,6 +149,7 @@ const SidebarMenu: React.FC = (): JSX.Element | null => { }, []); useEffect(() => { + if (sidebarOpen) containerRef.current?.querySelector('a')?.focus(); setTimeout(() => setSidebarVisible(sidebarOpen), sidebarOpen ? 0 : 150); }, [sidebarOpen]); @@ -183,8 +184,9 @@ const SidebarMenu: React.FC = (): JSX.Element | null => {