Fix: Forum Tab-Marquee scrollt jetzt bis zum Textende (Padding eingerechnet), SW by-v596
This commit is contained in:
parent
d1572c52bc
commit
83958cbb0b
3 changed files with 5 additions and 3 deletions
|
|
@ -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');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue