diff --git a/api/js/etemplate/etemplate2.js b/api/js/etemplate/etemplate2.js index 830d010c25..351a889e3c 100644 --- a/api/js/etemplate/etemplate2.js +++ b/api/js/etemplate/etemplate2.js @@ -149,11 +149,13 @@ var etemplate2 = /** @class */ (function () { // For templates which have sub templates and they are bigger than screenHeight if (screen.availHeight < jQuery(self._DOMContainer).height()) excess_height = 0; - // Call the "resize" event of all functions which implement the + // If we're visible, call the "resize" event of all functions which implement the // "IResizeable" interface - self._widgetContainer.iterateOver(function (_widget) { - _widget.resize(excess_height); - }, self, et2_IResizeable); + if (jQuery(self.DOMContainer).is(":visible")) { + self._widgetContainer.iterateOver(function (_widget) { + _widget.resize(excess_height); + }, self, et2_IResizeable); + } } }, 100); } diff --git a/api/js/etemplate/etemplate2.ts b/api/js/etemplate/etemplate2.ts index 385c05d423..98bbbf13c6 100644 --- a/api/js/etemplate/etemplate2.ts +++ b/api/js/etemplate/etemplate2.ts @@ -197,12 +197,15 @@ export class etemplate2 // For templates which have sub templates and they are bigger than screenHeight if (screen.availHeight < jQuery(self._DOMContainer).height()) excess_height = 0; - // Call the "resize" event of all functions which implement the + // If we're visible, call the "resize" event of all functions which implement the // "IResizeable" interface - self._widgetContainer.iterateOver(function (_widget) + if(jQuery(self.DOMContainer).is(":visible")) { - _widget.resize(excess_height); - }, self, et2_IResizeable); + self._widgetContainer.iterateOver(function (_widget) + { + _widget.resize(excess_height); + }, self, et2_IResizeable); + } } }, 100); }