mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03:00
Fixed home button not working occasionally when using versioning
This commit is contained in:
parent
adabdd0bec
commit
a261130204
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -216,7 +216,7 @@
|
||||
</script>
|
||||
{% endblock %}
|
||||
{% block scripts %}
|
||||
<script src="{{ 'assets/javascripts/bundle.382fbf4b.min.js' | url }}"></script>
|
||||
<script src="{{ 'assets/javascripts/bundle.6c7ad80a.min.js' | url }}"></script>
|
||||
{% for path in config["extra_javascript"] %}
|
||||
<script src="{{ path | url }}"></script>
|
||||
{% endfor %}
|
||||
|
@ -105,7 +105,6 @@ export function setupVersionSelector(
|
||||
if (ev.target instanceof Element) {
|
||||
const el = ev.target.closest("a")
|
||||
if (el && !el.target && urls.has(el.href)) {
|
||||
ev.preventDefault()
|
||||
const url = el.href
|
||||
// This is a temporary hack to detect if a version inside the
|
||||
// version selector or on another part of the site was clicked.
|
||||
@ -122,6 +121,7 @@ export function setupVersionSelector(
|
||||
if (version === current)
|
||||
return EMPTY
|
||||
}
|
||||
ev.preventDefault()
|
||||
return of(url)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user