From 3fc977c30eb8747fd953446e19c30c4ab2e37ea2 Mon Sep 17 00:00:00 2001 From: kolaente Date: Wed, 17 Jun 2026 19:32:39 +0200 Subject: [PATCH] fix(gantt): preserve horizontal scroll when focusing a task bar Focusing the task bar SVG `` inside the `overflow-x:auto` `.gantt-container` triggered Firefox's focus-induced scroll-into-view, which jumped the scroll container back toward `scrollLeft=0` (today). Pass `{ preventScroll: true }` to `focus()` so selecting a bar keeps the current scroll position. Chromium scrolls minimally on focus so it never manifested there. Fixes #2728 --- frontend/src/components/gantt/GanttChart.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/components/gantt/GanttChart.vue b/frontend/src/components/gantt/GanttChart.vue index 989bd400a..f75753428 100644 --- a/frontend/src/components/gantt/GanttChart.vue +++ b/frontend/src/components/gantt/GanttChart.vue @@ -730,7 +730,7 @@ function focusTaskBar(rowId: string) { setTimeout(() => { const taskBarElement = document.querySelector(`[data-row-id="${rowId}"] [role="slider"]`) as HTMLElement if (taskBarElement) { - taskBarElement.focus() + taskBarElement.focus({preventScroll: true}) } }, 0) }