Skip to content

Commit

Permalink
Merge pull request #37 from DjRAST/master
Browse files Browse the repository at this point in the history
Fix for issue #36: Scrolling to bottom does not work in container
  • Loading branch information
d-oliveros committed Oct 20, 2015
2 parents b8e41b8 + 8137a14 commit 1a132ff
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dist/angular-smooth-scroll.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion lib/angular-smooth-scroll.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,12 @@
*/
var stopAnimation = function () {
currentLocation = getScrollLocation();
internalHeight = window.innerHeight + currentLocation;
if(containerPresent) {
scrollHeight = container.scrollHeight;
internalHeight = container.clientHeight + currentLocation;
} else {
scrollHeight = document.body.scrollheight;
internalHeight = window.innerHeight + currentLocation;
}

if (
Expand Down

0 comments on commit 1a132ff

Please sign in to comment.