Focus selected in LanguageDropdown
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
parent
36dc15022d
commit
2c37fe26e4
1 changed files with 1 additions and 1 deletions
|
@ -283,7 +283,7 @@ const LanguageDropdown: React.FC<ILanguageDropdown> = ({ 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);
|
||||
|
|
Loading…
Reference in a new issue