diff --git a/management/univention-web/js/widgets/Grid.js b/management/univention-web/js/widgets/Grid.js index bf13f439ff..56930c2925 100644 --- a/management/univention-web/js/widgets/Grid.js +++ b/management/univention-web/js/widgets/Grid.js @@ -332,8 +332,7 @@ define([ }, _onScroll: function() { - var isActiveTab = !!document.getElementById(this.id).offsetParent; - if (!isActiveTab) { + if (!this._isActiveTab()) { return; } var viewPortHeight = dojoWindow.getBox().h; @@ -344,12 +343,17 @@ define([ } }, + _isActiveTab: function() { + var isActiveTab = !!document.getElementById(this.id).offsetParent; + return isActiveTab; + }, + _heightenGrid: function(extension) { var gridHeight = style.get(this._grid.domNode, "height"); var newMaxGridHeight = gridHeight + extension; style.set(this._grid.domNode, "max-height", newMaxGridHeight + 'px'); this._grid.resize(); - var gridIsFullyRendered = this._grid.domNode.scrollHeight < newMaxGridHeight; + var gridIsFullyRendered = this._isActiveTab() && this._grid.domNode.scrollHeight < newMaxGridHeight; if (gridIsFullyRendered) { this._updateFooterContent(); this._scrollSignal.remove();