Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/cellnav/test/uiGridCellNavService.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ describe('ui.grid.edit uiGridCellNavService', function() {
$timeout.flush();

expect(args.grid).toEqual(grid);
expect(Math.round(args.y.percentage * 10) / 10).toBe(0.4);
expect(Math.round(args.y.percentage * 10) / 10).toBe(0.5);
expect(isNaN(args.x.percentage)).toEqual(true);
});

Expand Down Expand Up @@ -233,7 +233,7 @@ describe('ui.grid.edit uiGridCellNavService', function() {
});
$timeout.flush();

expect(Math.round(args.y.percentage * 10) / 10).toEqual(0.5);
expect(Math.round(args.y.percentage * 10) / 10).toEqual(0.6);
expect(args.x).toBe(null);
});

Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/js/factories/Grid.js
Original file line number Diff line number Diff line change
Expand Up @@ -1685,7 +1685,7 @@ angular.module('ui.grid')

// gridUtil.logDebug('viewPortHeight', viewPortHeight);

return viewPortHeight;
return viewPortHeight > 0 ? viewPortHeight : 0;
};

Grid.prototype.getViewportWidth = function getViewportWidth() {
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/js/factories/GridRenderContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ angular.module('ui.grid')

viewPortHeight = viewPortHeight + adjustment.height;

return viewPortHeight;
return viewPortHeight > 0 ? viewPortHeight : 0;
};

GridRenderContainer.prototype.getViewportWidth = function getViewportWidth() {
Expand Down