Skip to content

Commit

Permalink
Added check for a nativeMaxScroll of 0 in getNativeMaxScroll
Browse files Browse the repository at this point in the history
  • Loading branch information
Zane McCaig committed Nov 24, 2015
1 parent 89c47c2 commit 3cf3e37
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions js/angular/controller/infiniteScrollController.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,15 @@ function($scope, $attrs, $element, $timeout) {
};
var computedStyle = window.getComputedStyle(self.scrollEl) || {};
return {
left: computedStyle.overflowX === 'scroll' ||
computedStyle.overflowX === 'auto' ||
self.scrollEl.style['overflow-x'] === 'scroll' ?
left: maxValues.left &&
(computedStyle.overflowX === 'scroll' ||
computedStyle.overflowX === 'auto' ||
self.scrollEl.style['overflow-x'] === 'scroll') ?
calculateMaxValue(maxValues.left) : -1,
top: computedStyle.overflowY === 'scroll' ||
computedStyle.overflowY === 'auto' ||
self.scrollEl.style['overflow-y'] === 'scroll' ?
top: maxValues.top &&
(computedStyle.overflowY === 'scroll' ||
computedStyle.overflowY === 'auto' ||
self.scrollEl.style['overflow-y'] === 'scroll' ) ?
calculateMaxValue(maxValues.top) : -1
};
};
Expand Down

0 comments on commit 3cf3e37

Please sign in to comment.