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

Đang mở
#22,744 6 bình luận 4 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

bug: external type: bug
Ngôn ngữ chính
TypeScript
Star
52.7k
Fork
13.3k
Merge trung bình
1 ngày 14 giờ
Pull request đã merge (30 ngày)
50

Mô tả

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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Xây dựng bản tái hiện kensodemann/test-input được liên kết và chạy nó trên thiết bị iOS, sau đó theo dõi hành vi ion-input clearInput sau khi xóa văn bản. Xác nhận rằng bàn phím quay lại chế độ viết hoa khi bắt đầu nhập sau khi input được xóa, đồng thời giữ nguyên hành vi hiện có trên Android.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
angular, ios, typescript
Lĩnh vực
frontend, mobile
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.