ionic-team / ionic-v3

The repo for Ionic 3.x. For the latest version of Ionic, please see https://github.com/ionic-team/ionic
Other
127 stars 85 forks source link

Unexpected behavior on ion-input #881

Open ionitron-bot[bot] opened 5 years ago

ionitron-bot[bot] commented 5 years ago

Original issue by @asuroalex on 2018-01-12T15:53:21Z

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

I'm submitting a ... (check one with "x") [x] bug report [ ] feature request

Current behavior: I have a reactive form with an ion-input in an ion-item. The first time I touch the input and then touch outside, the ‘ng-untouched’ on the ion-item still exists on the ion-item. The second time I touch the input, it changes to ‘ng-touched’.

Expected behavior: When I firstly touch input the 'ng-untouched' in the corresponding ion-item should change to 'ng-touched'.

Steps to reproduce: https://stackblitz.com/edit/ionic-wqatxh I added a required Validator to the field to show the behavior.

  1. Click inside the input field (the border is blue)
  2. Click outside the input field (the border is grey | should be red)
  3. Click inside the input field (the border is blue)
  4. Click outside the input field (the border is red)

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

cli packages: (/usr/local/lib/node_modules)

    @ionic/cli-utils  : 1.18.0
    ionic (Ionic CLI) : 3.18.0

global packages:

    cordova (Cordova CLI) : 8.0.0 

local packages:

    @ionic/app-scripts : 3.1.0
    Cordova Platforms  : android 6.3.0
    Ionic Framework    : ionic-angular 3.9.2

System:

    Android SDK Tools : 26.1.1
    Node              : v7.4.0
    npm               : 5.5.1 
    OS                : Linux 4.4

Environment Variables:

    ANDROID_HOME : /home/abrokle/Apps/android-sdk

Misc:

    backend : pro
thaxy commented 5 years ago

This bug still persists. Here my issue on Stack Overflow.