Skip to content

Commit 2822787

Browse files
committed
fix(core): scrollTo rightBound calculation
closes #4389
1 parent c4483de commit 2822787

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/js/core/factories/Grid.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -2298,7 +2298,7 @@ angular.module('ui.grid')
22982298
//}
22992299

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

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

0 commit comments

Comments
 (0)