$ionicScrollDelegate scroll methods don't work on iOS


#1

Part of the app I’m working on is kind of a chat screen where at the bottom you have a text area for typing text and messages are shown in an ion-list wrapped in ion-scroll.

need to make sure that when the user starts typing and the keyboard opens they always see the last chat message above input field. Right now I’m doing this with $ionicScrollDelegate and its scrollBottom() method like this:

  var dialogScrollDelegate = $ionicScrollDelegate.$getByHandle("dialog-scroll");

  $window.addEventListener("native.keyboardshow", function() {
    $timeout(scrollToLastMessage, 1000);
  });

  function scrollToLastMessage() {
    dialogScrollDelegate.scrollBottom(arguments);
  }

It’s working great on Android but on iOS scrollBottom() doesn’t seem to do anything. Same for scrollTop(), scrollTo(), etc.

What am I doing wrong?

I’m using native scrolling and keyboard scroll is also disabled via cordova.plugins.Keyboard.disableScroll(true).

Ionic version: 1.3.2