mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03:00
Fixed edge case with anchor links when using instant navigation
This commit is contained in:
parent
d68db58553
commit
485fa76fbc
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.5cfa9459.min.js' | url }}"></script>
|
<script src="{{ 'assets/javascripts/bundle.7c1205d0.min.js' | url }}"></script>
|
||||||
{% for script in config.extra_javascript %}
|
{% for script in config.extra_javascript %}
|
||||||
{{ script | script_tag }}
|
{{ script | script_tag }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
@ -370,10 +370,11 @@ export function setupInstantNavigation(
|
|||||||
// the scroll restoration to the current page, as we don't need to restore
|
// the scroll restoration to the current page, as we don't need to restore
|
||||||
// the viewport offset when the user navigates to a different page, as this
|
// the viewport offset when the user navigates to a different page, as this
|
||||||
// is already handled by the previous observable.
|
// is already handled by the previous observable.
|
||||||
location$.pipe(
|
document$.pipe(
|
||||||
|
switchMap(() => location$),
|
||||||
distinctUntilKeyChanged("pathname"),
|
distinctUntilKeyChanged("pathname"),
|
||||||
switchMap(() => location$),
|
switchMap(() => location$),
|
||||||
distinctUntilKeyChanged("hash"),
|
distinctUntilKeyChanged("hash")
|
||||||
),
|
),
|
||||||
|
|
||||||
// Handle instant navigation events that are triggered by the user clicking
|
// Handle instant navigation events that are triggered by the user clicking
|
||||||
|
Loading…
Reference in New Issue
Block a user