Skip to content

Commit d07554b

Browse files
committed
silence fomantic error regarding tabs (go-gitea#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 f8ea50c commit d07554b

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)