mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03:00
Revert "Fixed instant loading jumping back to the top"
This reverts commit f480bb28a9
.
This commit is contained in:
parent
f480bb28a9
commit
f00cd81f89
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -240,7 +240,7 @@
|
|||||||
</script>
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block scripts %}
|
{% block scripts %}
|
||||||
<script src="{{ 'assets/javascripts/bundle.16752b02.min.js' | url }}"></script>
|
<script src="{{ 'assets/javascripts/bundle.56494524.min.js' | url }}"></script>
|
||||||
{% for path in config.extra_javascript %}
|
{% for path in config.extra_javascript %}
|
||||||
<script src="{{ path | url }}"></script>
|
<script src="{{ path | url }}"></script>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
@ -206,7 +206,6 @@ export function setupInstantLoading(
|
|||||||
sample(response$)
|
sample(response$)
|
||||||
)
|
)
|
||||||
.subscribe(({ url }) => {
|
.subscribe(({ url }) => {
|
||||||
console.log("history.pushState")
|
|
||||||
history.pushState({}, "", `${url}`)
|
history.pushState({}, "", `${url}`)
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -289,7 +288,7 @@ export function setupInstantLoading(
|
|||||||
sample(document$)
|
sample(document$)
|
||||||
)
|
)
|
||||||
.subscribe(({ url, offset }) => {
|
.subscribe(({ url, offset }) => {
|
||||||
if (url.hash && !offset?.y) {
|
if (url.hash && !offset) {
|
||||||
setLocationHash(url.hash)
|
setLocationHash(url.hash)
|
||||||
} else {
|
} else {
|
||||||
window.scrollTo(0, offset?.y || 0)
|
window.scrollTo(0, offset?.y || 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user