From 6afb954b93a2ddfa6b62699a7ca5eb7aa1adb533 Mon Sep 17 00:00:00 2001 From: Richard Schreiber Date: Fri, 18 Dec 2020 09:33:27 +0100 Subject: [PATCH] =?UTF-8?q?Fix=20#1879=20--=20Do=20not=20add=20a=20tab?= =?UTF-8?q?=E2=80=99s=20hash/id=20to=20location.hash=20if=20it=20is=20insi?= =?UTF-8?q?de=20a=20.panel=20(#1881)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Raphael Michel --- src/pretix/static/pretixcontrol/js/ui/main.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/pretix/static/pretixcontrol/js/ui/main.js b/src/pretix/static/pretixcontrol/js/ui/main.js index 23c0a91f9..e0ce8e34d 100644 --- a/src/pretix/static/pretixcontrol/js/ui/main.js +++ b/src/pretix/static/pretixcontrol/js/ui/main.js @@ -614,7 +614,10 @@ $(function () { $('.nav-tabs a[href="#' + url.split('#')[1] + '"]').tab('show'); } $('a[data-toggle="tab"]').on('click', function (e) { - window.location.hash = e.target.hash; + if (!$(this).closest(".tab-content").length) { + // only append hash if not inside a .panel + window.location.hash = this.hash; + } }); // Event wizard