Skip to content

Commit

Permalink
amend(refresher): fix for if height is unknowable, and earlier commit…
Browse files Browse the repository at this point in the history
… changes lost in scrollView
  • Loading branch information
perrygovier committed Sep 17, 2014
1 parent db27fb1 commit e608bad
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion js/angular/controller/scrollController.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
14 changes: 9 additions & 5 deletions js/views/scrollView.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit e608bad

Please sign in to comment.