mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
fix(scrollDelegate): revert change that made all scroll* methods blur inputs
Closes #2745
This commit is contained in:
13
js/angular/controller/scrollController.js
vendored
13
js/angular/controller/scrollController.js
vendored
@@ -113,14 +113,12 @@ function($scope,
|
||||
};
|
||||
|
||||
self.scrollTop = function(shouldAnimate) {
|
||||
ionic.DomUtil.blurAll();
|
||||
self.resize().then(function() {
|
||||
scrollView.scrollTo(0, 0, !!shouldAnimate);
|
||||
});
|
||||
};
|
||||
|
||||
self.scrollBottom = function(shouldAnimate) {
|
||||
ionic.DomUtil.blurAll();
|
||||
self.resize().then(function() {
|
||||
var max = scrollView.getScrollMax();
|
||||
scrollView.scrollTo(max.left, max.top, !!shouldAnimate);
|
||||
@@ -128,35 +126,30 @@ function($scope,
|
||||
};
|
||||
|
||||
self.scrollTo = function(left, top, shouldAnimate) {
|
||||
ionic.DomUtil.blurAll();
|
||||
self.resize().then(function() {
|
||||
scrollView.scrollTo(left, top, !!shouldAnimate);
|
||||
});
|
||||
};
|
||||
|
||||
self.zoomTo = function(zoom, shouldAnimate, originLeft, originTop) {
|
||||
ionic.DomUtil.blurAll();
|
||||
self.resize().then(function() {
|
||||
scrollView.zoomTo(zoom, !!shouldAnimate, originLeft, originTop);
|
||||
});
|
||||
};
|
||||
|
||||
self.zoomBy = function(zoom, shouldAnimate, originLeft, originTop) {
|
||||
ionic.DomUtil.blurAll();
|
||||
self.resize().then(function() {
|
||||
scrollView.zoomBy(zoom, !!shouldAnimate, originLeft, originTop);
|
||||
});
|
||||
};
|
||||
|
||||
self.scrollBy = function(left, top, shouldAnimate) {
|
||||
ionic.DomUtil.blurAll();
|
||||
self.resize().then(function() {
|
||||
scrollView.scrollBy(left, top, !!shouldAnimate);
|
||||
});
|
||||
};
|
||||
|
||||
self.anchorScroll = function(shouldAnimate) {
|
||||
ionic.DomUtil.blurAll();
|
||||
self.resize().then(function() {
|
||||
var hash = $location.hash();
|
||||
var elm = hash && $document[0].getElementById(hash);
|
||||
@@ -180,11 +173,7 @@ function($scope,
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
self._setRefresher = function(
|
||||
refresherScope,
|
||||
refresherElement,
|
||||
refresherMethods
|
||||
) {
|
||||
self._setRefresher = function(refresherScope, refresherElement, refresherMethods) {
|
||||
self.refresher = refresherElement;
|
||||
var refresherHeight = self.refresher.clientHeight || 60;
|
||||
scrollView.activatePullToRefresh(
|
||||
|
||||
Reference in New Issue
Block a user