mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-11-23 23:21:00 +01:00
Fixed invalid tooltip position in tables when using table sort
This commit is contained in:
parent
7a770dc7be
commit
e5c9575dda
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>
|
||||
{% endblock %}
|
||||
{% block scripts %}
|
||||
<script src="{{ 'assets/javascripts/bundle.471ce7a9.min.js' | url }}"></script>
|
||||
<script src="{{ 'assets/javascripts/bundle.af256bd8.min.js' | url }}"></script>
|
||||
{% for script in config.extra_javascript %}
|
||||
{{ script | script_tag }}
|
||||
{% endfor %}
|
||||
|
@ -27,6 +27,7 @@ import {
|
||||
Subject,
|
||||
animationFrameScheduler,
|
||||
combineLatest,
|
||||
combineLatestWith,
|
||||
debounce,
|
||||
defer,
|
||||
distinctUntilChanged,
|
||||
@ -138,7 +139,12 @@ export function watchTooltip2(
|
||||
defer(() => getElementContainers(el)).pipe(
|
||||
mergeMap(watchElementContentOffset),
|
||||
throttleTime(1),
|
||||
map(() => getElementOffsetAbsolute(el))
|
||||
// Note that we need to poll the value again if the active state changes,
|
||||
// as otherwise the tooltip might be misplaced. This particularly happens
|
||||
// when using third-party integrations like tablesort that change the
|
||||
// position of elements – see https://t.ly/Y-V7X
|
||||
combineLatestWith(active$),
|
||||
map(() => getElementOffsetAbsolute(el)),
|
||||
)
|
||||
|
||||
// Only track parent elements and compute offset of the tooltip host if the
|
||||
|
Loading…
Reference in New Issue
Block a user