Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ng-touched applied to ion-input on keyup instead of blur as of release 3.4.0 #12102

Closed
frontendbeast opened this issue Jun 20, 2017 · 11 comments
Closed
Assignees

Comments

@frontendbeast
Copy link

Ionic version: (check one with "x")
[ ] 1.x (For Ionic 1.x issues, please use https://github.com/ionic-team/ionic-v1)
[ ] 2.x
[X] 3.x

I'm submitting a ... (check one with "x")
[X] bug report
[ ] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or http://ionicworldwide.herokuapp.com/

Current behavior:
ng-touched is being applied to ion-input fields on keyup

Expected behavior:
ng-touched should be applied to ion-input fields on blur

Steps to reproduce:
The bug is present in ionic-angular@3.4.0, but NOT present in ionic-angular@3.3.0.

Create a basic formBuilder form, start typing into ion-input field. ng-touched is added on keyup. Start typing into standard input field, ng-touched is added on blur.

http://plnkr.co/edit/8NtRId4YGbhXTHcWOMfV?p=preview

Other information:
Bug was introduced in release 3.4.0 as it works as expected in 3.3.0.

Ionic info: (run ionic info from a terminal/cmd prompt and paste output below):

global packages:

    @ionic/cli-utils : 1.4.0
    Cordova CLI      : 6.5.0
    Ionic CLI        : 3.4.0

local packages:

    @ionic/app-scripts              : 1.3.7
    @ionic/cli-plugin-cordova       : 1.4.0
    @ionic/cli-plugin-ionic-angular : 1.3.1
    Cordova Platforms               : android 6.2.3 ios 4.4.0
    Ionic Framework                 : ionic-angular 3.4.0

System:

    Node       : v6.9.1
    OS         : macOS Sierra
    Xcode      : Xcode 8.3.3 Build version 8E3004b
    ios-deploy : 1.9.1
    ios-sim    : 5.0.13
    npm        : 3.10.8

@AmitMY
Copy link
Contributor

AmitMY commented Jun 20, 2017

@manucorporat

@fephil
Copy link

fephil commented Jun 20, 2017

Hi. Just to confirm this happens with Ionic 3.4.2 as well.

@manucorporat manucorporat self-assigned this Jun 20, 2017
@jgw96 jgw96 added v2 and removed v2 labels Jun 21, 2017
@RodolfoSilva
Copy link

I have the same problem with ionic 3.4.2...

@tobiasmuecksch
Copy link

tobiasmuecksch commented Jun 29, 2017

Yep, same here! I can confirm this is still an issue in 3.5.0 and 3.6.0

@RodolfoSilva
Copy link

The attibute _isTouch in TextInput has changed, but not the ngTouched... I think my PR #12315 solve this.

@manucorporat plz, can you check my PR? #12315

@mhartington
Copy link
Contributor

Hey folks! Sorry this feel under that radar. @RodolfoSilva we'll look at your PR and give it a test.

@packowitz
Copy link

@mhartington is there any progress as this is really an annoying issue?

@ddahan
Copy link

ddahan commented Sep 12, 2017

Hi @kensodemann
I just noticed you released the 3.6.1 before including this fix.
May I suggest this fix is important enough to justify a 3.6.2 release as soon as possible?
Thanks.

@kensodemann
Copy link
Member

@ddahan - this fix was intentionally delayed until after the 3.6.1 release because of timing, ability to fully test, etc. This will be included in a 3.6.2 release at some point in the near future (think weeks rather than months). There are a couple of other important items that are being wrapped up to be included in that release. I'll report back later on how that is going.

@Yerkon
Copy link

Yerkon commented Jun 5, 2018

@kensodemann, problem isn't solved. After manually setting controls to touched, there is no updates in UI.

  for (var controlName in this.productForm.controls) {
      this.productForm.controls[controlName].markAsTouched();
    }

template:

 <form [formGroup]="productForm"
        (ngSubmit)="onProductSubmit()">
    <ion-list>
      <ion-grid>
        <ion-row>
          <ion-item no-lines>
            <ion-label>Штрих-код</ion-label>
            <ion-input type="text"
                       formControlName="code"></ion-input>
          </ion-item>
        </ion-row>
...

"ionic-angular": "3.9.2",

@ionitron-bot
Copy link

ionitron-bot bot commented Sep 1, 2018

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Sep 1, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests