Skip to content

Ionic 4 Button does not trigger ngSubmit #15136

@zlawson-ut

Description

@zlawson-ut

Bug Report

Ionic Info

Ionic:

   ionic (Ionic CLI)          : 4.0.1 (/usr/local/lib/node_modules/ionic)
   Ionic Framework            : @ionic/angular 4.0.0-beta.0
   @angular-devkit/core       : 0.7.0-rc.3
   @angular-devkit/schematics : 0.7.0-rc.3
   @angular/cli               : 6.0.8
   @ionic/ng-toolkit          : 1.0.0
   @ionic/schematics-angular  : 1.0.1

Cordova:

   cordova (Cordova CLI) : 6.5.0
   Cordova Platforms     : none

System:

   ios-deploy : 1.9.1
   ios-sim    : 5.0.13
   NodeJS     : v9.5.0 (/usr/local/Cellar/node/9.5.0/bin/node)
   npm        : 5.6.0
   OS         : OS X El Capitan
   Xcode      : Xcode 8.0 Build version 8A218a

Environment:

   ANDROID_HOME : not set

Describe the Bug
<ion-button type="submit"> does not trigger NgForm ngSubmit any longer after upgrading to ionic 4. The intended behavior is referenced in the previous version here: https://ionicframework.com/docs/developer-resources/forms/

Steps to Reproduce
Steps to reproduce the behavior:

  1. Create a form like <form (ngSubmit)="onSignup(form)" #form="ngForm"> containing <ion-button expand="full" type="submit">Sign up</ion-button>
  2. Submit the form using the enter key
  3. onSignup is not triggered.

Related Code
The previous behavior that should happen is referenced here: https://ionicframework.com/docs/developer-resources/forms/

Expected Behavior
ngSubmit event to be triggered on either submiting form by enter keypress or by clicking the submit button.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions