change sidebar click behavior

Signed-off-by: Hadi <[email protected]>
This commit is contained in:
Hadi
2026-09-07 10:08:42 +02:00
parent 080ed34fe4
commit 4dada889cb
+4 -1
View File
@@ -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) => {