Automatic Keyboard in Input with Ionic

0

I need a routine on Ionic that calls the cellphone's Keyboard to an Ion-input as it enters the page.

An example page would be:

<ion-content padding>
  <form>
    <ion-row>
      <ion-col>
        <ion-input #user name="user" type="text" placeholder="Usuário"></ion-input>
      </ion-col>
    </ion-row>
  </form>
</ion-content>
What I want is to use the Navigating Lifecycle from Ionic (I believe that in this case using the ionViewDidEnter) to bring the focus and the Keyboard in the field automatically, I've already tried some codes but unfortunately sometimes it works and sometimes not, thanks since already.

    
asked by anonymous 16.08.2018 / 16:37

1 answer

0

With the Keyboard class you can check if there is already some input with focus, in case you can not focus it and using the plugin you can force the keyboard to display.

Keyboard class: link

Plugin: link

    
19.08.2018 / 00:22