Fixed intercepting of link clicks when instant loading is disabled

This commit is contained in:
squidfunk 2020-03-05 21:03:51 +01:00
parent 012cd24f06
commit abec4824bd
6 changed files with 7 additions and 7 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
{
"assets/javascripts/bundle.js": "assets/javascripts/bundle.5b33ad8d.min.js",
"assets/javascripts/bundle.js.map": "assets/javascripts/bundle.5b33ad8d.min.js.map",
"assets/javascripts/bundle.js": "assets/javascripts/bundle.7fa1da95.min.js",
"assets/javascripts/bundle.js.map": "assets/javascripts/bundle.7fa1da95.min.js.map",
"assets/javascripts/vendor.js": "assets/javascripts/vendor.31a2e7b9.min.js",
"assets/javascripts/vendor.js.map": "assets/javascripts/vendor.31a2e7b9.min.js.map",
"assets/javascripts/worker/search.js": "assets/javascripts/worker/search.edc88caf.min.js",

View File

@ -179,7 +179,7 @@
{% endblock %}
{% block scripts %}
<script src="{{ 'assets/javascripts/vendor.31a2e7b9.min.js' | url }}"></script>
<script src="{{ 'assets/javascripts/bundle.5b33ad8d.min.js' | url }}"></script>
<script src="{{ 'assets/javascripts/bundle.7fa1da95.min.js' | url }}"></script>
{%- set translations = {} -%}
{%- for key in [
"clipboard.copy",

View File

@ -319,7 +319,7 @@ export function initialize(config: unknown) {
if (ev.target instanceof HTMLElement) {
const el = ev.target.closest("a") // TODO: abstract as link click?
if (el && isLocationInternal(el)) {
if (!isLocationAnchor(el))
if (!isLocationAnchor(el) && config.features.includes("instant"))
ev.preventDefault()
return of(el)
}