Fix: Kopfzeilen-Breite per JS an Scrollbar-Breite anpassen

This commit is contained in:
2026-04-08 15:15:37 +02:00
parent 6a25607103
commit 377a24eac6

View File

@@ -157,6 +157,12 @@ export function renderWeek(container, currentDate, events, onSlotClick, onEventC
const body = container.querySelector('.week-body');
if (body) body.scrollTop = 8 * hourH - 20;
// Align sticky header width to body content width (account for scrollbar)
const stickyTop = container.querySelector('.week-head-sticky');
if (body && stickyTop) {
stickyTop.style.paddingRight = (body.offsetWidth - body.clientWidth) + 'px';
}
// Render current-time line
renderNowLine(container, days, hourH);