diff --git a/etemplate/js/et2_widget_tabs.js b/etemplate/js/et2_widget_tabs.js index 407fd8e342..141f752011 100644 --- a/etemplate/js/et2_widget_tabs.js +++ b/etemplate/js/et2_widget_tabs.js @@ -236,12 +236,16 @@ var et2_tabbox = et2_valueWidget.extend([et2_IInput], // We can do this and not wind up with 2 because child is a template, // which has special handling - this._children[0].loadingFinished(promises); + // disabling immediate direct call for selected tab seems to have no recognisable impact and + // some widgets, eg. color-picker have problems with calling doLoadingFinished twice + // (color input gets re-rendered second time after hitting [Apply], if color-picker is in a tab) + //this._children[0].loadingFinished(promises); // Defer parsing & loading of other tabs until later window.setTimeout(function() { for (var i = 0; i < tabs.tabData.length; i++) { + if (i == tabs.selected_index) continue; tabs._loadTab(i,promises); } jQuery.when.apply(jQuery,promises).then(function() { @@ -343,7 +347,7 @@ var et2_tabbox = et2_valueWidget.extend([et2_IInput], /** * Gets the index of the currently active tab - * + * * @returns {number} */ get_active_tab: function() { @@ -352,7 +356,7 @@ var et2_tabbox = et2_valueWidget.extend([et2_IInput], /** * Sets the currently active tab by index - * + * * @param {number} _idx */ setActiveTab: function(_idx) {