From 5c4737d46bb7a3ed103294193f7304a72fdf8a27 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Fri, 6 Aug 2021 19:31:52 +0200 Subject: [PATCH] only rewrite url for tabs if the tab has the class url-rewrite --- UI/Component/Tab.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/UI/Component/Tab.js b/UI/Component/Tab.js index 07576f1..09fb260 100644 --- a/UI/Component/Tab.js +++ b/UI/Component/Tab.js @@ -98,11 +98,13 @@ export class Tab jsOMS.addClass(this, 'active'); /* Add selected tab */ - window.history.replaceState(null, '', - UriFactory.build( - '{%}#' + (fragmentString === '' ? '' : fragmentString) - ) - ); + if (jsOMS.hasClass(this.closest('.tabview'), 'url-rewrite')) { + window.history.replaceState(null, '', + UriFactory.build( + '{%}#' + (fragmentString === '' ? '' : fragmentString) + ) + ); + } }); }