Skip to content

Commit fec3544

Browse files
silverwindtechknowlogick
authored andcommitted
silence fomantic error regarding tabs (#9713) (#9718)
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 f8ea50c commit fec3544

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

web_src/js/index.js

+3
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)