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
128 stars 85 forks source link

<ion-input> and <ion-textarea> changedetection causes slow typing experience #421

Open ionitron-bot[bot] opened 5 years ago

ionitron-bot[bot] commented 5 years ago

Original issue by @issy123 on 2018-06-09T18:48:02Z

Bug Report

Ionic Info Using ionic-angular@3.3.0

Describe the Bug <ion-input> and <ion-textarea> causes 2 change detections when clicking on it and 2(!) changedetections for every single keypress. For the Ionic chat app that I am building it makes the typing experience very slow.

Steps to Reproduce Steps to reproduce the behavior:

  1. Go to http://plnkr.co/edit/mRRVD2TxEL2JsDEbvPTh?p=preview
  2. Open your console
  3. On the right side try to type something in the <io-input> or <ion-textarea>
  4. Notice changedetection when typing
  5. Try using the <textarea> or <input> elements
  6. Notice no changedetection when typing

Related Code Source: http://plnkr.co/edit/mRRVD2TxEL2JsDEbvPTh?p=preview Focus on home.page.ts/.html

Expected Behavior Less or no change detection should happen when preferring <ion-input> over <input>

Additional Context Here is an example of the slow typing experience using <ion-textarea>

slow typing

vityapro commented 4 years ago

Just infinity circle of issue. Good job @ionitron-bot! https://github.com/ionic-team/ionic/issues/10837