From 56d0c5eaf5c0e3c1c1012dbb595756f7cd49f022 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20B=C3=B6hmer?= Date: Fri, 5 Apr 2019 19:36:16 +0200 Subject: [PATCH] Dont use ajax for links starting with # (internal navigation). --- assets/ts_src/ajax_ui.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/ts_src/ajax_ui.ts b/assets/ts_src/ajax_ui.ts index a2e4d913..337886f9 100644 --- a/assets/ts_src/ajax_ui.ts +++ b/assets/ts_src/ajax_ui.ts @@ -243,7 +243,7 @@ class AjaxUI { public registerLinks() { // Unbind all old handlers, so the things are not executed multiple times. - $('a').not(".link-external, [data-no-ajax], .page-link").unbind('click').click(function (event) { + $('a').not(".link-external, [data-no-ajax], .page-link, [href^='#']").unbind('click').click(function (event) { let a = $(this); let href = $.trim(a.attr("href")); //Ignore links without href attr and nav links ('they only have a #)