I have created a login form for my app with ionic 3, when I toggle the keyboard the content at the bottom moves to the top part.
This is my design for the screen when keyboard is not toggled.
When the keyboard is toggled.
My html mockup
<ion-content text-center class="login">
<!--top-->
<form [formGroup]="valForm" (submit)="OnLogin($event, valForm.value)">
<div padding class="animated fadeIn center-On-Screen" ion-fixed>
<img class="logo" src="assets/img/logo.png">
<ion-list padding>
<ion-item>
<ion-input type="email" placeholder="E-mail"
class="form-control" name="email"
autocomplete="off" formControlName="email"
required></ion-input>
</ion-item>
<ion-item>
<ion-input type="password" placeholder="Password"
name="password"
formControlName="password" required=""></ion-input>
</ion-item>
<ion-item>
<div class="forgotpass" item-right (click)="Forgotpass()">Forgot password</div>
</ion-item>
</ion-list>
</div>
<div class="signin-content btn-holder" ion-fixed>
<div class=" animated bounceInUp">
<button ion-button block outline color="light" type="submit" [disabled]="!valForm.valid">Sign In</button>
</div>
</div>
</form>
<!--footer-->
<div class="footer-content btn-holder" ion-fixed>
<div class=" animated bounceInUp">
<button ion-button block color="facebook" (click)="doFbLogin()">Facebook</button>
</div>
</div>
<div class="footer-signup signup">
<div class="animated bounceInUp">
<a color="light" (click)="Register()">New Here?
<strong>Sign Up</strong>
</a>
</div>
</div>
CSS for the positioning.
.signin-content {
position: fixed;
bottom: 20%;
width: 100%;
}
.footer-content {
position: fixed;
bottom: 12%;
width: 100%;
}
.signup-content{
position: fixed;
bottom: 10%;
width: 100%;
}
How can I make it such that the content remain at the bottom.
My development environment.
cli packages:
@ionic/cli-utils : 1.19.0
ionic (Ionic CLI) : 3.19.0
global packages:
cordova (Cordova CLI) : 7.0.1
local packages:
@ionic/app-scripts : 3.1.2
Cordova Platforms : android 6.2.3 ios 4.4.0
Ionic Framework : ionic-angular 3.7.1
System:
Android SDK Tools : 25.2.2
ios-deploy : 1.9.1
ios-sim : https://registry.npmjs.org/ios-sim/-/ios-sim-5.0.12.tgz
Node : v8.5.0
npm : 5.5.1
OS : macOS High Sierra
Have tried this solution from this link Ionic native keyboard plus the solution below editing the config.xml
but still didn't fix.