Skip to content

Commit

Permalink
fix(scrollDelegate): revert change that made all scroll* methods blur…
Browse files Browse the repository at this point in the history
… inputs

Closes #2745
  • Loading branch information
ajoslin committed Feb 6, 2015
1 parent 878c817 commit 0145dc3
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions js/angular/controller/scrollController.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,50 +113,43 @@ 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);
});
};

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);
Expand All @@ -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(
Expand Down

0 comments on commit 0145dc3

Please sign in to comment.