Fix: Forum Tab-Marquee scrollt jetzt bis zum Textende (Padding eingerechnet), SW by-v596

This commit is contained in:
rene 2026-05-02 08:39:22 +02:00
parent d1572c52bc
commit 83958cbb0b
3 changed files with 5 additions and 3 deletions

View file

@ -135,7 +135,9 @@ window.Page_forum = (() => {
const btn = e.target.closest('.by-tab');
const span = btn?.querySelector('.by-tab-text');
if (!span) return;
const overflow = span.scrollWidth - btn.clientWidth;
const style = getComputedStyle(btn);
const padH = parseFloat(style.paddingLeft) + parseFloat(style.paddingRight);
const overflow = span.scrollWidth - (btn.clientWidth - padH);
if (overflow <= 2) return;
span.style.setProperty('--tab-scroll-px', `-${overflow}px`);
span.classList.add('scrolling');