Skip to content

Commit

Permalink
Merge pull request #2897 from foxx9/patch-1
Browse files Browse the repository at this point in the history
Update ui-grid-render-container.js
  • Loading branch information
c0bra committed Mar 9, 2015
2 parents 9812185 + d6a356f commit edb2588
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/js/core/directives/ui-grid-render-container.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit edb2588

Please sign in to comment.