fix: Incorrect sidebar behavior on click

This commit is contained in:
Aleksi Lassila
2024-05-13 00:48:41 +03:00
parent 8d5e071862
commit 0a43a5c231

View File

@@ -8,7 +8,7 @@
MagnifyingGlass
} from 'radix-icons-svelte';
import classNames from 'classnames';
import { type Readable, writable, type Writable } from 'svelte/store';
import { get, type Readable, writable, type Writable } from 'svelte/store';
import Container from '../../../Container.svelte';
import { useLocation, useNavigate } from 'svelte-navigator';
import { registrars, Selectable } from '../../selectable';
@@ -35,7 +35,7 @@
const selectIndex = (index: number) => () => {
if (index === activeIndex) {
Selectable.giveFocus('right');
if (get(selectable.hasFocusWithin)) Selectable.giveFocus('right');
return;
}
selectable.focusChild(index);