Stop keyboard from pushing things up

Is it possible to stop the keyboard (the option element selector) from pushing things up? I want to keep it on top of everything.

Im doing a converter and want the 3 elements to always be visable, the first one is pushed up here:

Also is it possible to change the “Done”-text?

Im using the latest ionic stuff

Are you using the inputs in the footer? Do you have the ionic keyboard installed?

Nope the inputs (<select>-elements) are placed in a .col in a .row in a <ion-content>

Yep, have ionic keyboard installed, but have also tried without it

seems like the whole viewport is pushed up

SOLVED!

Put this in $ionicPlatform.ready

document.addEventListener('focus',function(e){
  e.preventDefault(); e.stopPropagation();
  window.scrollTo(0,0);
}, true);
1 Like

Hey @tobbe, glad to see you resolved this.

Another solution you can do is to disable the view port from scrolling when the keyboard is open with cordova.plugins.Keyboard.disableScroll(true); in a run function.

.run(function ($ionicPlatform) {
    $ionicPlatform.ready(function () {
        // Hide the accessory bar by default (remove this to show the acces$
        // for form inputs)
        if (window.cordova && window.cordova.plugins.Keyboard) {
            cordova.plugins.Keyboard.disableScroll(true);
        }
        if (window.StatusBar) {
            // org.apache.cordova.statusbar required
            StatusBar.styleDefault();
        }
    });
}) 
1 Like