From 2c37fe26e4e7713553742564d6263e7ac8eb49e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?marcin=20miko=C5=82ajczak?= Date: Sun, 2 Jun 2024 16:49:05 +0200 Subject: [PATCH] Focus selected in LanguageDropdown MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: marcin mikołajczak --- src/features/compose/components/language-dropdown.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/features/compose/components/language-dropdown.tsx b/src/features/compose/components/language-dropdown.tsx index dadbbeb30b..b2382d797f 100644 --- a/src/features/compose/components/language-dropdown.tsx +++ b/src/features/compose/components/language-dropdown.tsx @@ -283,7 +283,7 @@ const LanguageDropdown: React.FC = ({ composeId }) => { useEffect(() => { if (isOpen) { if (refs.floating.current) { - (refs.floating.current?.querySelector('li a[role=\'button\']') as HTMLAnchorElement)?.focus(); + (refs.floating.current?.querySelector('div[aria-selected=true]') as HTMLDivElement)?.focus(); } document.addEventListener('click', handleDocumentClick, false);