Handle enter event from keyboard


#1

Hi all ! Could anyone suggest please … how to handle enter event in form ? I have two buttons … Help and Next … When I click enter in my keyboard run (click)="help(), but I need run (click)="login(loginForm)

<ion-row>
  <ion-col col-6>
     <button ion-button class="btn-help" (click)="help()">Help</button>
  </ion-col>
 <ion-col col-6>
    <button ion-button class="btn-login" (click)="login(loginForm)">Next</button>
  </ion-col>
</ion-row>

#2

Add type="button" to the help button. All buttons in forms are submit buttons by default.