scrollBottom loses the keyboard / input selected

I had the same issue also, it is because ionic.DomUtil.blurAll() is called in the scrollBottom function. You can modify the function like so -

self.scrollTop = function(shouldAnimate, noBlur) {
    if (!noBlur) {
      ionic.DomUtil.blurAll();
    }
    self.resize().then(function() {
      scrollView.scrollTo(0, 0, !!shouldAnimate);
    });
  };

  self.scrollBottom = function(shouldAnimate, noBlur) {
    if (!noBlur) {
      ionic.DomUtil.blurAll();
    }
    self.resize().then(function() {
      var max = scrollView.getScrollMax();
      scrollView.scrollTo(max.left, max.top, !!shouldAnimate);
    });
  };

Call it like this now to avoid the blur from being called -

viewScroll.scrollBottom(true, true); // read below on this

See this and [this] (https://github.com/driftyco/ionic/issues/2904) for more info.

1 Like