File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed
Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -484,13 +484,10 @@ function autoHideEmptyTabs(counts, prefixes) {
484484 if ($activeLi.length === 0) {
485485 const $firstVisibleLi = $(`#tabs-location li:visible`).first();
486486 if ($firstVisibleLi.length) {
487- $firstVisibleLi.addClass('active');
488- const targetPrefix = $firstVisibleLi.find('a').attr('href')?.replace('#', '');
489- if (targetPrefix) {
490- $(`#tabs-content-location > #${targetPrefix}`).addClass('active');
491- // Trigger shown.bs.tab so deferred DataTables initialize
492- $firstVisibleLi.find('a').tab('show');
493- }
487+ // Let Bootstrap's .tab('show') manage the active class on both
488+ // the <li> and the pane — adding it manually beforehand causes
489+ // Bootstrap to bail out early without firing shown.bs.tab.
490+ $firstVisibleLi.find('a').tab('show');
494491 }
495492 }
496493}
You can’t perform that action at this time.
0 commit comments