fix(scroll): safari scroll content height

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
This commit is contained in:
Adam Bradley
2014-06-17 10:52:52 -05:00
parent 754ef461e8
commit 96b2243f15

View File

@@ -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);
}
};