mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-11-23 23:21:00 +01:00
Fixed active tab stolen on scroll with linked content tabs
This commit is contained in:
parent
b5b7e9d678
commit
1cc45d50d0
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -249,7 +249,7 @@
|
|||||||
</script>
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block scripts %}
|
{% block scripts %}
|
||||||
<script src="{{ 'assets/javascripts/bundle.081f42fc.min.js' | url }}"></script>
|
<script src="{{ 'assets/javascripts/bundle.ad660dcc.min.js' | url }}"></script>
|
||||||
{% for script in config.extra_javascript %}
|
{% for script in config.extra_javascript %}
|
||||||
{{ script | script_tag }}
|
{{ script | script_tag }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
@ -38,7 +38,6 @@ import {
|
|||||||
skip,
|
skip,
|
||||||
startWith,
|
startWith,
|
||||||
subscribeOn,
|
subscribeOn,
|
||||||
switchMap,
|
|
||||||
takeUntil,
|
takeUntil,
|
||||||
tap,
|
tap,
|
||||||
withLatestFrom
|
withLatestFrom
|
||||||
@ -137,7 +136,7 @@ export function mountContentTabs(
|
|||||||
return defer(() => {
|
return defer(() => {
|
||||||
const push$ = new Subject<ContentTabs>()
|
const push$ = new Subject<ContentTabs>()
|
||||||
const done$ = push$.pipe(ignoreElements(), endWith(true))
|
const done$ = push$.pipe(ignoreElements(), endWith(true))
|
||||||
combineLatest([push$, watchElementSize(el)])
|
combineLatest([push$, watchElementSize(el), watchElementVisibility(el)])
|
||||||
.pipe(
|
.pipe(
|
||||||
takeUntil(done$),
|
takeUntil(done$),
|
||||||
auditTime(1, animationFrameScheduler)
|
auditTime(1, animationFrameScheduler)
|
||||||
@ -286,9 +285,8 @@ export function mountContentTabs(
|
|||||||
})
|
})
|
||||||
|
|
||||||
/* Create and return component */
|
/* Create and return component */
|
||||||
return watchElementVisibility(el)
|
return watchContentTabs(inputs)
|
||||||
.pipe(
|
.pipe(
|
||||||
switchMap(() => watchContentTabs(inputs)),
|
|
||||||
tap(state => push$.next(state)),
|
tap(state => push$.next(state)),
|
||||||
finalize(() => push$.complete()),
|
finalize(() => push$.complete()),
|
||||||
map(state => ({ ref: el, ...state }))
|
map(state => ({ ref: el, ...state }))
|
||||||
|
Loading…
Reference in New Issue
Block a user