Skip to content

Commit 5cbaf5f

Browse files
committed
Merge pull request #4415 from b2io/fix-scrollTo-rightbound-calculation
fix(core): scrollTo rightBound calculation
2 parents fa87b42 + 2822787 commit 5cbaf5f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/js/core/factories/Grid.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2310,7 +2310,7 @@ angular.module('ui.grid')
23102310
//}
23112311

23122312
// The right position is the current X scroll position minus the grid width
2313-
var rightBound = self.renderContainers.body.prevScrollLeft + Math.ceil(self.gridWidth);
2313+
var rightBound = self.renderContainers.body.prevScrollLeft + Math.ceil(self.renderContainers.body.getViewportWidth());
23142314

23152315
// If there's a vertical scrollbar, subtract it from the right boundary or we'll allow it to obscure cells
23162316
//if (self.verticalScrollbarWidth) {

0 commit comments

Comments
 (0)