ionic-team / ionic-team/ionic-framework

bug: ios 14, input does not reset internal state on ios when clearing input, causing autocapitalize to not work

Ouverte
#22,744 6 commentaires 4 réactions 0 personnes assignées Voir sur GitHub
bug: external type: bug
Langage dominant
TypeScript
Étoiles
52.7k
Forks
13.3k
Merge moyen
1 j 15 h
PR mergées (30 j)
51

Description

# Bug Report

**Ionic version:**

[ ] **4.x**
[x] **5.x**

**Current behavior:**
With autocapitalize "on" and clearInput "true" on an ion-input, the keyboard on iOS comes up in capitalize mode, but if you type a word or two the hit the clear button added by clearInput, the input clears but the keyboard is not in capitalize mode.

A couple of notes on this:

- This is only in iOS, Android works normally
- If you backspace a couple of times after doing the clearInput, the keyboard will go back into capitalize mode and everything will work fine again
- Needs to be run on a device, autocapitalize itself does not see to work at all in the browser

**Expected behavior:**

After clearing the text, the keyboard would be in capitalize mode again as the user is starting a new sentence.

**Steps to reproduce:**
Build the following repo and run on an iOS device:

https://github.com/kensodemann/test-input

1. Enter some text, notice it is capitalized.
2. Hit the clearInput button.
3. Notice the text you start typing now is not capitalized
4. Hit the clear button again
5. Hit backspace twice
6. Now the text you type will be capitalized again.

**Ionic info:**

```
Ionic:

Ionic CLI : 6.12.3 (/Users/kensodemann/.nvm/versions/node/v14.15.1/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/angular 5.5.2
@angular-devkit/build-angular : 0.1000.8
@angular-devkit/schematics : 10.0.8
@angular/cli : 10.0.8
@ionic/angular-toolkit : 2.3.3

Capacitor:

Capacitor CLI : 2.4.5
@capacitor/core : 2.4.5

Utility:

cordova-res : 0.15.2
native-run (update available: 1.3.0) : 1.0.0

System:

NodeJS : v14.15.1 (/Users/kensodemann/.nvm/versions/node/v14.15.1/bin/node)
npm : 6.14.10
OS : macOS Big Sur
```

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.