From efe0b2b626e33a46c8ad09b03ff4f19df4999460 Mon Sep 17 00:00:00 2001 From: maax6 Date: Wed, 28 Jan 2026 02:16:17 +0100 Subject: [PATCH] feat(ui): enable horizontal wheel scroll on nav menu Converts vertical mouse wheel delta to horizontal scroll when hovering the nav sidebar in tablet/mobile view. This allows intuitive scrolling without needing Shift+wheel. AI-assisted: Claude (fully tested locally) --- ui/src/ui/app-lifecycle.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ui/src/ui/app-lifecycle.ts b/ui/src/ui/app-lifecycle.ts index 71af9d202..154023efd 100644 --- a/ui/src/ui/app-lifecycle.ts +++ b/ui/src/ui/app-lifecycle.ts @@ -61,6 +61,14 @@ export function handleConnected(host: LifecycleHost) { export function handleFirstUpdated(host: LifecycleHost) { observeTopbar(host as unknown as Parameters[0]); + // Horizontal wheel scroll for nav menu + document.querySelector('.nav')?.addEventListener('wheel', (evt) => { + const e = evt as WheelEvent; + if (e.deltaY !== 0) { + e.preventDefault(); + (e.currentTarget as HTMLElement).scrollLeft += e.deltaY; + } + }, { passive: false }); } export function handleDisconnected(host: LifecycleHost) {