diff --git a/src/js/core/factories/Grid.js b/src/js/core/factories/Grid.js index d4953555f1..4f26f67a7b 100644 --- a/src/js/core/factories/Grid.js +++ b/src/js/core/factories/Grid.js @@ -2298,7 +2298,7 @@ angular.module('ui.grid') //} // The right position is the current X scroll position minus the grid width - var rightBound = self.renderContainers.body.prevScrollLeft + Math.ceil(self.gridWidth); + var rightBound = self.renderContainers.body.prevScrollLeft + Math.ceil(self.renderContainers.body.getViewportWidth()); // If there's a vertical scrollbar, subtract it from the right boundary or we'll allow it to obscure cells //if (self.verticalScrollbarWidth) {