amend(refresher): fix for if height is unknowable, and earlier commit changes lost in scrollView

This commit is contained in:
Perry Govier
2014-09-16 22:55:13 -05:00
parent db27fb116c
commit e608bada6d
2 changed files with 10 additions and 6 deletions

View File

@@ -214,7 +214,7 @@ function($scope, scrollViewOptions, $timeout, $window, $$scrollValueCache, $loca
*/
this._setRefresher = function(refresherScope, refresherElement) {
var refresher = this.refresher = refresherElement;
var refresherHeight = self.refresher.clientHeight || 0;
var refresherHeight = self.refresher.clientHeight || 60;
scrollView.activatePullToRefresh(refresherHeight, function() {
// activateCallback
refresher.classList.add('active');

View File

@@ -687,11 +687,13 @@ ionic.views.Scroll = ionic.views.View.inherit({
self.resetScrollView = function(e) {
//return scrollview to original height once keyboard has hidden
self.isScrolledIntoView = false;
container.style.height = "";
container.style.overflow = "";
self.resize();
ionic.scroll.isScrolling = false;
if(self.isScrolledIntoView) {
self.isScrolledIntoView = false;
container.style.height = "";
container.style.overflow = "";
self.resize();
ionic.scroll.isScrolling = false;
}
};
//Broadcasted when keyboard is shown on some platforms.
@@ -1114,6 +1116,8 @@ ionic.views.Scroll = ionic.views.View.inherit({
},
resize: function() {
if(!this.__container || !this.options) return;
// Update Scroller dimensions for changed content
// Add padding to bottom of content
this.setDimensions(