Skip to content

Commit 1cc45d5

Browse files
committed
Fixed active tab stolen on scroll with linked content tabs
1 parent b5b7e9d commit 1cc45d5

File tree

4 files changed

+9
-11
lines changed

4 files changed

+9
-11
lines changed

material/templates/assets/javascripts/bundle.081f42fc.min.js renamed to material/templates/assets/javascripts/bundle.ad660dcc.min.js

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

material/templates/assets/javascripts/bundle.081f42fc.min.js.map renamed to material/templates/assets/javascripts/bundle.ad660dcc.min.js.map

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

material/templates/base.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@
249249
</script>
250250
{% endblock %}
251251
{% block scripts %}
252-
<script src="{{ 'assets/javascripts/bundle.081f42fc.min.js' | url }}"></script>
252+
<script src="{{ 'assets/javascripts/bundle.ad660dcc.min.js' | url }}"></script>
253253
{% for script in config.extra_javascript %}
254254
{{ script | script_tag }}
255255
{% endfor %}

src/templates/assets/javascripts/components/content/tabs/index.ts

+2-4
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ import {
3838
skip,
3939
startWith,
4040
subscribeOn,
41-
switchMap,
4241
takeUntil,
4342
tap,
4443
withLatestFrom
@@ -137,7 +136,7 @@ export function mountContentTabs(
137136
return defer(() => {
138137
const push$ = new Subject<ContentTabs>()
139138
const done$ = push$.pipe(ignoreElements(), endWith(true))
140-
combineLatest([push$, watchElementSize(el)])
139+
combineLatest([push$, watchElementSize(el), watchElementVisibility(el)])
141140
.pipe(
142141
takeUntil(done$),
143142
auditTime(1, animationFrameScheduler)
@@ -286,9 +285,8 @@ export function mountContentTabs(
286285
})
287286

288287
/* Create and return component */
289-
return watchElementVisibility(el)
288+
return watchContentTabs(inputs)
290289
.pipe(
291-
switchMap(() => watchContentTabs(inputs)),
292290
tap(state => push$.next(state)),
293291
finalize(() => push$.complete()),
294292
map(state => ({ ref: el, ...state }))

0 commit comments

Comments
 (0)