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

@ -3,7 +3,7 @@
Router, State-Management, Navigation, Initialisierung.
============================================================ */
const APP_VER = '595'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen
const APP_VER = '596'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen
const APP_VERSION = '1.2.1'; // ← semantische Version, wird bei make release gesetzt
const IS_STAGING = location.hostname === 'staging.banyaro.app';

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');