Skip to content

Commit

Permalink
fix(scroll): safari scroll content height
Browse files Browse the repository at this point in the history
Safari and Chrome have two different opinions of what `scrollHeight`
means. It appears Safari is not taking into account that the parent
element can have padding applied which changes the scrollHeight. Closes
#1411
  • Loading branch information
Adam Bradley committed Jun 17, 2014
1 parent 754ef46 commit 96b2243
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/views/scrollView.js
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ ionic.views.Scroll = ionic.views.View.inherit({
return Math.max(self.__content.scrollWidth, self.__content.offsetWidth);
},
getContentHeight: function() {
return Math.max(self.__content.scrollHeight, self.__content.offsetHeight);
return Math.max(self.__content.scrollHeight, self.__content.offsetHeight + self.__content.offsetTop);
}
};

Expand Down

0 comments on commit 96b2243

Please sign in to comment.