Scrolling after input focus

We are building a hybrid app with Ionic and Cordova. This topic concerns the Android version of our app, I did not test on iOS.

Device: galaxy tab 3
Keyboard: bluetooth (switched off the virtual keyboard)

The problem:
If I tab through the input fields Ionic tends to scroll after the viewport is already focussed on the caret. After this the app freezes for a sec. This damages the user experience since you have to wait about 1-2 secs before you can enter data. Any idea’s?

1 Like

Hey there :smile:

What you can do is disable native scrolling in your .run function

.run(function($ionicPlatform) {
  $ionicPlatform.ready(function() {
    // Hide the accessory bar by default (remove this to show the accessory bar above the keyboard
    // for form inputs)
    if(window.cordova && window.cordova.plugins.Keyboard) {
      cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
      cordova.plugins.Keyboard.disableScroll(false);
    }
    if(window.StatusBar) {
      // Set the statusbar to use the default style, tweak this to
      // remove the status bar on iOS or change it to use white instead of dark colors.
      StatusBar.styleDefault();
    }
  });
})

Hi Mike,

I am affraid that this is not working on Android. The docs also say its iOS only.

The view is ok for 2-3 sec. Then it scrolls down and the input field freezes, the caret is also placed at the incorrect position…

We are still having the same problems. Overflow-scroll=“true” is also not an option since the scrolling is getting stuck this way.

i’m also experiencing this same issue, it allows me to type but will only pick up the input after 2 secs.

Nobody has a solution? There must be more of you experiencing this particular issue.

Sjerd, have you been able to fix this yet?

Hey @gunborg, sorry for the delay. The ionic team was away last week.

Sooo from the sounds of this, it seems to be a bug. Can you open an issue for this and provide the relevant code so we can resolve this?

No, i have not. I was had a vacation so sorry for the late response.