You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Current behavior:
I want to add clearInput attribute on my ion-inputs. My ion-inputs have ngModel attributes and some have keyup functions bind to them. On IOS, the clearInput icon shows up on focus but nothing happends when clicking it besides the loss of focus on the ion-input. It does work on Android.
Expected behavior:
I expect inputs to be empty after clicking on the clearInput icon.
I was noticing the same issue. After playing around with it I started to notice it would work on some occasions. I think it's due to the 'hitbox' area of the clear button is very small on ios. On rare instances I could click it just right and get the expected behavior but the majority of the time it would just close the keyboard and retain the text. Just an assumption...
I face the same problem, but on desktop, and with an input of type "date" :
the hitbox of the clear button is so tiny that it becomes unusable.
The other input types work well.
Same issue here, changed to clearInput="true" and works on browser (ionic serve) but not on device. When tapping on the clear button, it just looses focus and closes the keyboard, but won't clear the text...
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.
Activity
[-]clearInput doesn't work on IOS[/-][+]clearInput doesn't seem to work on IOS[/+]jgw96 commentedon Feb 10, 2017
Hello, thanks for using Ionic! We will look into this.
pinpointpanda commentedon Feb 14, 2017
@bmagni thanks for raising this, you beat me to it!
I'm experiencing the same issue, although I'm binding slightly differently using a FormGroup instead of ngModel.
dalemugford commentedon Feb 16, 2017
Same issue, noticed it a few days ago. Have had to disable that feature in app.
Killmore commentedon May 12, 2017
I was noticing the same issue. After playing around with it I started to notice it would work on some occasions. I think it's due to the 'hitbox' area of the clear button is very small on ios. On rare instances I could click it just right and get the expected behavior but the majority of the time it would just close the keyboard and retain the text. Just an assumption...
elvandar06 commentedon May 18, 2017
I face the same problem, but on desktop, and with an input of type "date" :
the hitbox of the clear button is so tiny that it becomes unusable.
The other input types work well.
davibertolini commentedon May 22, 2017
Same issue here, changed to
clearInput="true"and works on browser (ionic serve) but not on device. When tapping on the clear button, it just looses focus and closes the keyboard, but won't clear the text...global packages:
local packages:
System:
jasonfairhead commentedon May 24, 2017
Same issue. any update @jgw96 ?
flyhuang commentedon Jun 7, 2017
Same issue.
I change "click" to "tap" in ionic/src/components/input/input.ts
'<button ion-button clear [hidden]="!clearInput" type="button" class="text-input-clear-icon" (click)="clearTextInput()" (mousedown)="clearTextInput()"></button>'It works fine.
jasonfairhead commentedon Jun 9, 2017
@flyhuang thanks!
fix(keyboard): big keyboard/input refactor
fix(keyboard): big keyboard/input refactor
jasonfairhead commentedon Dec 22, 2017
anyone notice that if using --prod to build this fix no longer works?
ionitron-bot commentedon 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.