From 86464de0c150e046b4590c02851c9c1111cd2176 Mon Sep 17 00:00:00 2001 From: silverwind Date: Sun, 12 Jan 2020 03:57:32 +0100 Subject: [PATCH] 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 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. --- web_src/js/index.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/web_src/js/index.js b/web_src/js/index.js index b8145fa439..b701da08b1 100644 --- a/web_src/js/index.js +++ b/web_src/js/index.js @@ -22,6 +22,9 @@ if (typeof (Dropzone) !== 'undefined') { Dropzone.autoDiscover = false; } +// Silence fomantic's error logging when tabs are used without a target content element +$.fn.tab.settings.silent = true; + function initCommentPreviewTab($form) { const $tabMenu = $form.find('.tabular.menu'); $tabMenu.find('.item').tab();