diff --git a/package.json b/package.json index cc94301..8d6b7d8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "my-weekly-todo-list", - "version": "1.33.4", + "version": "1.33.5", "description": "A web-based weekly task management application that organizes to-dos and calendar events in a single, intuitive weekly view", "main": "index.js", "scripts": { diff --git a/src/app/globals.css b/src/app/globals.css index ca8da9f..08dfb79 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -2409,7 +2409,7 @@ h3 { .time-slot-label { display: flex; - align-items: flex-start; + align-items: flex-start; justify-content: flex-end; padding: 0 0.5rem; font-size: 0.65rem; @@ -2417,6 +2417,7 @@ h3 { box-sizing: border-box; position: relative; z-index: 10; + transform: translateY(-0.4em); } .time-slot-label.hour-start { diff --git a/src/components/WeeklyView.tsx b/src/components/WeeklyView.tsx index 930712f..58b9b9a 100644 --- a/src/components/WeeklyView.tsx +++ b/src/components/WeeklyView.tsx @@ -2202,6 +2202,7 @@ export default function WeeklyView() { intendedScrollTop.current = scrollOffset; const perform = () => { + if (timeGridWrapperRef.current) timeGridWrapperRef.current.scrollTop = scrollOffset; if (gridRef.current) gridRef.current.scrollTop = scrollOffset; if (timeColumnRef.current) timeColumnRef.current.scrollTop = scrollOffset; }; @@ -2587,7 +2588,9 @@ export default function WeeklyView() { const slotHeight = getSlotHeight(cellDuration); const scrollOffset = workingHoursStart * slotsPerHour * slotHeight; - // Force it directly + // Scroll the time-grid-wrapper (the scrollable viewport) + if (timeGridWrapperRef.current) timeGridWrapperRef.current.scrollTop = scrollOffset; + // Also scroll inner refs as fallback if (gridRef.current) gridRef.current.scrollTop = scrollOffset; if (timeColumnRef.current) timeColumnRef.current.scrollTop = scrollOffset; @@ -2596,6 +2599,7 @@ export default function WeeklyView() { // On initial load, re-enforce for 2s to fight browser auto-scroll restoration if (!isInitialScrollDone.current) { const interval = setInterval(() => { + if (timeGridWrapperRef.current) timeGridWrapperRef.current.scrollTop = scrollOffset; if (gridRef.current) gridRef.current.scrollTop = scrollOffset; if (timeColumnRef.current) timeColumnRef.current.scrollTop = scrollOffset; }, 50); @@ -3448,6 +3452,7 @@ export default function WeeklyView() { // Navigation handlers with CSS class-based slide animation (works in all browsers) const gridRef = useRef(null); + const timeGridWrapperRef = useRef(null); const allSlideClasses = ["slide-animate-next", "slide-animate-prev", "slide-animate-week-next", "slide-animate-week-prev"]; const navigate = ( newDate: Date, @@ -6341,7 +6346,7 @@ export default function WeeklyView() { })()} {/* Main Grid with Time Column */} - {viewStyle !== "kanban" &&
{/* Time Column */}