Skip to content

Commit

Permalink
Merge pull request #2496 from VojtechVitek/issue_2461_touchmove
Browse files Browse the repository at this point in the history
Fix #2461: let the parent container scroll also on touchmove event
  • Loading branch information
PaulL1 committed Feb 6, 2015
2 parents 9928328 + a55438f commit a1082af
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/js/core/directives/ui-grid-render-container.js
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,11 @@
scrollEvent.x = { percentage: scrollXPercentage, pixels: deltaX };
}

// 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) ||
(scrollEvent.x && scrollEvent.x.percentage !== 0 && scrollEvent.x.percentage !== 1)) {
event.preventDefault();
}
scrollEvent.fireScrollingEvent();
}

Expand Down

0 comments on commit a1082af

Please sign in to comment.