Disable Keyboard Scroll on-demand

I saw a lot of solutions to disable keyboard scroll. Solutions like this, for example… https://gist.github.com/EvanWillms/8773f8cfa12f469fabf0bdd7a75723e7

Yes, it works…but I’d like to know if it’s possible to disable Keyboard not in an App level, but on-demand. I some pages or pushed views, modals…when I want…

is it possible ?

@papaidofe did you find a solution for this?

In fact yes ! install the native keyboard and …

import { Keyboard } from ‘@ionic-native/keyboard’;

constructor(public keyboard: Keyboard) {}

disableTheKeyboard() {
this.keyboard.disableScroll(true);
}
enableTheKeyboard() {
this.keyboard.disableScroll(false);
}

3 Likes

Is keyboard.disableScroll(true); gone ?
What is the alternative?

For now, downgrading is the solution

Not working in ionic 4 . Can you post a new method ?