mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
amend(refresher): fix for if height is unknowable, and earlier commit changes lost in scrollView
This commit is contained in:
2
js/angular/controller/scrollController.js
vendored
2
js/angular/controller/scrollController.js
vendored
@@ -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');
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user