From ad619d23d50e922463222777ef3abd9056a74ba8 Mon Sep 17 00:00:00 2001 From: Hadi <112569860+anotherhadi@users.noreply.github.com> Date: Mon, 7 Sep 2026 10:16:22 +0200 Subject: [PATCH] fix focus issue Signed-off-by: Hadi <112569860+anotherhadi@users.noreply.github.com> --- dist/{chunk-89xtp8sa.js => chunk-kd78dgfb.js} | 2 ++ dist/components/Sidebar.js | 2 +- dist/components/index.js | 2 +- src/components/Sidebar.tsx | 2 ++ 4 files changed, 6 insertions(+), 2 deletions(-) rename dist/{chunk-89xtp8sa.js => chunk-kd78dgfb.js} (99%) diff --git a/dist/chunk-89xtp8sa.js b/dist/chunk-kd78dgfb.js similarity index 99% rename from dist/chunk-89xtp8sa.js rename to dist/chunk-kd78dgfb.js index 66d292b..45a9ef5 100644 --- a/dist/chunk-89xtp8sa.js +++ b/dist/chunk-kd78dgfb.js @@ -32,8 +32,10 @@ function Sidebar(props) { return; const index = itemIndexAtScreenY(select, event.y); if (index !== null) { + select.focus(); select.setSelectedIndex(index); select.selectCurrent(); + event.preventDefault(); } }; const handleMouseScroll = (event) => { diff --git a/dist/components/Sidebar.js b/dist/components/Sidebar.js index 99cb95a..3015dcb 100644 --- a/dist/components/Sidebar.js +++ b/dist/components/Sidebar.js @@ -1,7 +1,7 @@ // @bun import { Sidebar -} from "../chunk-89xtp8sa.js"; +} from "../chunk-kd78dgfb.js"; import"../chunk-x7m82z3z.js"; import"../chunk-7f8jagy5.js"; import"../chunk-hcq62p48.js"; diff --git a/dist/components/index.js b/dist/components/index.js index b14f080..1d17d37 100644 --- a/dist/components/index.js +++ b/dist/components/index.js @@ -1,7 +1,7 @@ // @bun import { Sidebar -} from "../chunk-89xtp8sa.js"; +} from "../chunk-kd78dgfb.js"; import { NotificationHost } from "../chunk-b0h95a6q.js"; diff --git a/src/components/Sidebar.tsx b/src/components/Sidebar.tsx index 8f3a34e..745d330 100644 --- a/src/components/Sidebar.tsx +++ b/src/components/Sidebar.tsx @@ -47,8 +47,10 @@ export function Sidebar(props: SidebarProps) { if (!select) return; const index = itemIndexAtScreenY(select, event.y); if (index !== null) { + select.focus(); select.setSelectedIndex(index); select.selectCurrent(); + event.preventDefault(); } };