From 96b2243f15628d4cfed84aba4649a6f2e28b6314 Mon Sep 17 00:00:00 2001 From: Adam Bradley Date: Tue, 17 Jun 2014 10:52:52 -0500 Subject: [PATCH] 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 --- js/views/scrollView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/views/scrollView.js b/js/views/scrollView.js index 883f1c4232..4e67704dd2 100644 --- a/js/views/scrollView.js +++ b/js/views/scrollView.js @@ -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); } };