diff --git a/front/pluginsCore.php b/front/pluginsCore.php index 36685e51..2f7f9689 100755 --- a/front/pluginsCore.php +++ b/front/pluginsCore.php @@ -484,13 +484,10 @@ function autoHideEmptyTabs(counts, prefixes) { if ($activeLi.length === 0) { const $firstVisibleLi = $(`#tabs-location li:visible`).first(); if ($firstVisibleLi.length) { - $firstVisibleLi.addClass('active'); - const targetPrefix = $firstVisibleLi.find('a').attr('href')?.replace('#', ''); - if (targetPrefix) { - $(`#tabs-content-location > #${targetPrefix}`).addClass('active'); - // Trigger shown.bs.tab so deferred DataTables initialize - $firstVisibleLi.find('a').tab('show'); - } + // Let Bootstrap's .tab('show') manage the active class on both + // the