Skip to content

Commit d272fa3

Browse files
author
nilad
committed
vertical scroll length should never be 0. This will result in division by 0 errors
1 parent eec9067 commit d272fa3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/js/core/factories/GridRenderContainer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ angular.module('ui.grid')
300300
};
301301

302302
GridRenderContainer.prototype.getVerticalScrollLength = function getVerticalScrollLength() {
303-
return this.getCanvasHeight() - this.getViewportHeight() + this.grid.scrollbarHeight;
303+
return this.getCanvasHeight() - this.getViewportHeight() + this.grid.scrollbarHeight !== 0 ? this.getCanvasHeight() - this.getViewportHeight() + this.grid.scrollbarHeight : -1;
304304
};
305305

306306
GridRenderContainer.prototype.getHorizontalScrollLength = function getHorizontalScrollLength() {

0 commit comments

Comments
 (0)