Ionic 5 keyboard still pushes my content up

I am having the same issue with my Ionic Capacitor app on Android

Ionic CLI : 6.16.3
Ionic Framework : @ionic/angular 5.8.0
@angular-devkit/build-angular : 0.901.15
@angular-devkit/schematics : 9.1.13
@angular/cli : 9.1.15

I have tried several suggested solutions from v3 and v4 including (but not limited to)

or things like

this.platform.keyboardDidShow.subscribe(() => {
this.content.scrollToPoint(0, 0, 0);
this.content.scrollToTop();
});

and/or

.scroll-content {

padding-bottom: 0 !important;

}

and/or

IonicModule.forRoot({
  scrollPadding: false,
  scrollAssist: false
}),

What sort of works is adding “adjustPan” to android manifest but I have other screens with more fields and this disables scrolling when the keyboard is open, so also not a good solution:

<activity android:name=".MainActivity" android:windowSoftInputMode="adjustPan">

Does anyone have a solution for this?

Thank you very much.

2 Likes