Fixed overflow for alternate style when more than 10 tabs are present

This commit is contained in:
squidfunk
2021-10-11 14:33:28 +02:00
parent 6fab1e3654
commit 969c713567
8 changed files with 15 additions and 14 deletions

View File

@@ -80,7 +80,7 @@ export function mountContentTabs(
// TODO: Hack, scrollIntoView is too buggy
const container = active.parentElement!
if (
active.offsetLeft + active.offsetWidth > container.offsetWidth ||
active.offsetLeft + active.offsetWidth > container.scrollLeft + container.offsetWidth ||
active.offsetLeft < container.scrollLeft
)
container.scrollTo({