diff --git a/src/js/core/directives/ui-grid-render-container.js b/src/js/core/directives/ui-grid-render-container.js index 6ee28527a5..02044d89b2 100644 --- a/src/js/core/directives/ui-grid-render-container.js +++ b/src/js/core/directives/ui-grid-render-container.js @@ -148,9 +148,9 @@ scrollEvent.x = { percentage: scrollXPercentage, pixels: scrollXAmount }; } - // todo: this isn't working when scrolling down. it works fine for up. tested on Chrome + // Let the parent container scroll if the grid is already at the top/bottom - if ((scrollEvent.y && scrollEvent.y.percentage !== 0 && scrollEvent.y.percentage !== 1) || + if ((scrollEvent.y && scrollEvent.y.percentage !== 0 && scrollEvent.y.percentage !== 1 && containerCtrl.viewport[0].scrollTop !== 0 ) || (scrollEvent.x && scrollEvent.x.percentage !== 0 && scrollEvent.x.percentage !== 1)) { event.preventDefault();