Fixed instant loading not honoring target=_blank

This commit is contained in:
squidfunk 2020-04-17 21:10:04 +02:00
parent 5b8721ff92
commit e96657cc1e
7 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

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.4dfac743.min.js",
"assets/javascripts/bundle.js.map": "assets/javascripts/bundle.4dfac743.min.js.map",
"assets/javascripts/bundle.js": "assets/javascripts/bundle.0f38e514.min.js",
"assets/javascripts/bundle.js.map": "assets/javascripts/bundle.0f38e514.min.js.map",
"assets/javascripts/vendor.js": "assets/javascripts/vendor.d7126665.min.js",
"assets/javascripts/vendor.js.map": "assets/javascripts/vendor.d7126665.min.js.map",
"assets/javascripts/worker/search.js": "assets/javascripts/worker/search.58d22e8e.min.js",

View File

@ -179,7 +179,7 @@
</div>
{% block scripts %}
<script src="{{ 'assets/javascripts/vendor.d7126665.min.js' | url }}"></script>
<script src="{{ 'assets/javascripts/bundle.4dfac743.min.js' | url }}"></script>
<script src="{{ 'assets/javascripts/bundle.0f38e514.min.js' | url }}"></script>
{%- set translations = {} -%}
{%- for key in [
"clipboard.copy",

View File

@ -125,7 +125,7 @@ export function setupInstantLoading(
switchMap(ev => {
if (ev.target instanceof HTMLElement) {
const el = ev.target.closest("a")
if (el && isLocalLocation(el)) {
if (el && !el.target && isLocalLocation(el)) {
if (!isAnchorLocation(el))
ev.preventDefault()
return of(el)