title: Scroll up when keyboard is open Ionic 2
body: <p>I try to design a login screen with Ionic and my fields are in center of my page.
  When I select an input, I want to scroll up the screen to keep my field and my login button in the center of the app screen. </p>
  
  <p>I have this what is in 1, and I want the 2</p>
  
  <p><a href="https://i.stack.imgur.com/iDfAl.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/iDfAl.png" alt="enter image description here"></a></p>
  
  <p>I really don't know how to do that.</p>
  
  <p>There is my html code :</p>
  
  <pre><code>&lt;ion-content class="login-page-background"&gt;
    &lt;div class="content-login"&gt;
      &lt;img src="assets/images/logo-yellow.svg" width="70%"&gt;&lt;br&gt;&lt;br&gt;
      &lt;div&gt;
        &lt;div class="login-information-bloc"&gt;
          &lt;input placeholder="{{this.translate.get('...')}}" (select)="scrollUp()" class="input-login"/&gt;
          &lt;input type="password" placeholder="{{this.translate.get('...')}}" class="input-login"/&gt;&lt;br&gt;
          &lt;p class="password-forgot"&gt;{{this.translate.get('...')}}&lt;/p&gt;
        &lt;/div&gt;
        &lt;button (click)="login()" ion-button color="secondary"&gt;
          &lt;label&gt;{{this.translate.get('...')}}&lt;/label&gt;
        &lt;/button&gt;
      &lt;/div&gt;
  
      &lt;div class="flag-bloc"&gt;
        &lt;p&gt;{{this.translate.get('...')}}&lt;/p&gt;
        &lt;img src="assets/images/fr.svg" (click)="changeCountry('fr')" [ngClass]="{'flag-button' : this.fr_selected}" width="55px" style="margin: 0px 10px 0px 10px"&gt;
        &lt;img src="assets/images/ch.svg" (click)="changeCountry('ch')" [ngClass]="{'flag-button' : this.ch_selected}" width="55px" style="margin: 0px 10px 0px 10px"&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/ion-content&gt;
  </code></pre>