mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2026-07-22 22:03:35 -04:00
Fixed scrolling of alternate tabs implementation
This commit is contained in:
@@ -52,7 +52,7 @@ export interface ContentTabs {
|
||||
export function watchContentTabs(
|
||||
el: HTMLElement
|
||||
): Observable<ContentTabs> {
|
||||
if (!el.classList.contains(".tabbed-alternate"))
|
||||
if (!el.classList.contains("tabbed-alternate"))
|
||||
return NEVER
|
||||
else
|
||||
return merge(...getElements(":scope > input", el)
|
||||
@@ -77,7 +77,11 @@ export function mountContentTabs(
|
||||
): Observable<Component<ContentTabs>> {
|
||||
const internal$ = new Subject<ContentTabs>()
|
||||
internal$.subscribe(({ active }) => {
|
||||
active.scrollIntoView({ behavior: "smooth", block: "nearest" })
|
||||
active.scrollIntoView({
|
||||
behavior: "smooth",
|
||||
block: "nearest",
|
||||
inline: "start"
|
||||
})
|
||||
})
|
||||
|
||||
/* Create and return component */
|
||||
|
||||
Reference in New Issue
Block a user