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

未关闭
#22,744 6 条评论 4 个 reaction 已指派 0 人 在 GitHub 查看
bug: external type: bug
主要语言
TypeScript
星标
52.7k
派生
13.3k
平均合并
1 天 15 小时
30 天内合并 PR
51

描述

# 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
```

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。