diff --git a/src/components/Sidebar.tsx b/src/components/Sidebar.tsx index 4fbefe5..8f3a34e 100644 --- a/src/components/Sidebar.tsx +++ b/src/components/Sidebar.tsx @@ -46,7 +46,10 @@ export function Sidebar(props: SidebarProps) { const handleMouseDown = (event: MouseEvent) => { if (!select) return; const index = itemIndexAtScreenY(select, event.y); - if (index !== null) select.setSelectedIndex(index); + if (index !== null) { + select.setSelectedIndex(index); + select.selectCurrent(); + } }; const handleMouseScroll = (event: MouseEvent) => {