Skip to content

Commit 86464de

Browse files
silverwindsapk
authored andcommitted
silence fomantic error regarding tabs (#9713)
Fomantic expects all tabs to have a target element with content as defined by the data-tab attribute. All our usage of the tab module seems to use <a> element tabs that link to new pages so these content elements are never present and fomantic complains about that in the console with an "Activated tab cannot be found" error. This silences that error.
1 parent fef49f5 commit 86464de

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

web_src/js/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ if (typeof (Dropzone) !== 'undefined') {
2222
Dropzone.autoDiscover = false;
2323
}
2424

25+
// Silence fomantic's error logging when tabs are used without a target content element
26+
$.fn.tab.settings.silent = true;
27+
2528
function initCommentPreviewTab($form) {
2629
const $tabMenu = $form.find('.tabular.menu');
2730
$tabMenu.find('.item').tab();

0 commit comments

Comments
 (0)