From 4dada889cb72bbc9f0008e134c017a53d3558a7d Mon Sep 17 00:00:00 2001 From: Hadi <112569860+anotherhadi@users.noreply.github.com> Date: Mon, 7 Sep 2026 10:08:26 +0200 Subject: [PATCH] change sidebar click behavior Signed-off-by: Hadi <112569860+anotherhadi@users.noreply.github.com> --- src/components/Sidebar.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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) => {