Skip to content

Commit 78a4b43

Browse files
committed
fix(Scrolling): Don't trap scroll at 100% down
My commit 382f0ae broke a fix from #2762. This change puts the fix back. This should fix #1926
1 parent 4381ca5 commit 78a4b43

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/js/core/directives/ui-grid-render-container.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -150,12 +150,12 @@
150150

151151
// todo: this isn't working when scrolling down. it works fine for up. tested on Chrome
152152
// Let the parent container scroll if the grid is already at the top/bottom
153-
if ((scrollEvent.y && scrollEvent.y.percentage !== 0 && scrollEvent.y.percentage !== 1 && containerCtrl.viewport[0].scrollTop !== 0 ) ||
153+
if ((scrollEvent.y && scrollEvent.y.percentage !== 0 && scrollEvent.y.percentage !== 1) ||
154154
(scrollEvent.x && scrollEvent.x.percentage !== 0 && scrollEvent.x.percentage !== 1)) {
155-
event.preventDefault();
156-
}
157155

158-
scrollEvent.fireThrottledScrollingEvent();
156+
event.preventDefault();
157+
scrollEvent.fireThrottledScrollingEvent();
158+
}
159159
});
160160

161161
$elm.bind('$destroy', function() {

0 commit comments

Comments
 (0)