Skip to content

Commit

Permalink
Removing adjustment for parentOffsetTop which can cause issues with b…
Browse files Browse the repository at this point in the history
…oth the scollbar container size and the calculated scroll length
  • Loading branch information
od0 committed Jun 17, 2015
1 parent a124f5c commit 790af3f
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/ng-scrollbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,11 +172,7 @@ angular.module('ngScrollbar', []).directive('ngScrollbar', [
thumbLine = angular.element(thumb.children()[0]);
track = angular.element(angular.element(tools.children()[0]).children()[1]);

// Check if scroll bar is needed
page.height = element[0].offsetHeight - parentOffsetTop;
if (page.height < 0) {
page.height = element[0].offsetHeight;
}
page.height = element[0].offsetHeight;
page.scrollHeight = transculdedContainer[0].scrollHeight;

if (page.height < page.scrollHeight) {
Expand Down

0 comments on commit 790af3f

Please sign in to comment.