From df05c51457ed2fede2071358d5e3f2663581fc4f Mon Sep 17 00:00:00 2001 From: kolaente Date: Thu, 19 Feb 2026 16:08:52 +0100 Subject: [PATCH] fix: clamp gantt bar title position when task starts before visible range Resolves go-vikunja/vikunja#149 --- frontend/src/components/gantt/GanttRowBars.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/gantt/GanttRowBars.vue b/frontend/src/components/gantt/GanttRowBars.vue index e4210746f..3f476b16c 100644 --- a/frontend/src/components/gantt/GanttRowBars.vue +++ b/frontend/src/components/gantt/GanttRowBars.vue @@ -243,7 +243,9 @@ const getBarTextX = computed(() => (bar: GanttBarModel) => { if (bar.meta?.dateType === 'endOnly') { return getBarX.value(bar) + getBarWidth.value(bar) - 8 } - return getBarX.value(bar) + 8 + // When the bar starts before the visible range, clamp text to the left edge + // so the title remains visible within the visible portion of the bar. + return Math.max(getBarX.value(bar) + 8, 8) }) function isPartialDate(bar: GanttBarModel) {