[iOS] The styling does not change when the CJK character enter TextInput
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- C++
- Star
- 127k
- Fork
- 25.3k
- Merge trung bình
- 1 ngày 23 giờ
- Pull request đã merge (30 ngày)
- 4
Mô tả
Description
When entering CJK characters in the TextInput component, the styling does not change.
I wanted to change the styling according to the type of characters entered, but I don't think react can detect the state change.
The example screen is,
The even number of letters is red
The odd-numbered letter is a simple logic that handles it in blue.
Logic does not work in Korean while it works normally in the English environment.
From searching, it seems that this phenomenon occurs in Korean, Chinese, and Japanese equally.
Steps to reproduce
- The even number of letters color is red, The odd-numbered letter color is blue.
- type english / type CJK Character
React Native Version
0.72.6
Affected Platforms
Runtime - iOS
Output of npx react-native info
System:
OS: macOS 13.5
CPU: (10) arm64 Apple M1 Pro
Memory: 66.83 MB / 16.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 16.14.0
path: ~/.nvm/versions/node/v16.14.0/bin/node
Yarn:
version: 1.22.19
path: ~/.nvm/versions/node/v16.14.0/bin/yarn
npm:
version: 8.3.1
path: ~/.nvm/versions/node/v16.14.0/bin/npm
Watchman:
version: 2023.10.23.00
path: /opt/homebrew/bin/watchman
Managers:
CocoaPods:
version: 1.14.2
path: /opt/homebrew/bin/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 22.4
- iOS 16.4
- macOS 13.3
- tvOS 16.4
- watchOS 9.4
Android SDK:
API Levels:
- "28"
- "29"
- "30"
- "31"
- "33"
- "34"
Build Tools:
- 29.0.2
- 29.0.3
- 30.0.2
- 30.0.3
- 31.0.0
- 32.0.0
- 33.0.0
System Images:
- android-29 | Intel x86 Atom_64
- android-29 | Google APIs ARM 64 v8a
- android-29 | Google APIs Intel x86 Atom_64
- android-30 | Google APIs Intel x86 Atom
- android-30 | Google Play Intel x86 Atom
- android-33 | Google APIs ARM 64 v8a
Android NDK: Not Found
IDEs:
Android Studio: 2021.3 AI-213.7172.25.2113.9014738
Xcode:
version: 14.3.1/14E300c
path: /usr/bin/xcodebuild
Languages:
Java:
version: 11.0.17
path: /usr/bin/javac
Ruby:
version: 3.1.4
path: /Users/dev002/.rbenv/shims/ruby
npmPackages:
"@react-native-community/cli": Not Found
react:
installed: 18.2.0
wanted: 18.2.0
react-native:
installed: 0.72.6
wanted: 0.72.6
react-native-macos: Not Found
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: true
newArchEnabled: false
iOS:
hermesEnabled: true
newArchEnabled: false
Stacktrace or Logs
-
Reproducer
https://github.com/1nno-vator/rn-textinput-cjk-issue
Screenshots and Videos
Work Well: Type English
[Video] Work Well: Type English
https://github.com/facebook/react-native/assets/55885561/d3f59132-27d0-4e15-b0ed-59eb0f89affc
Error Case: Type Korean
[Video] Error Case: Type Korean
https://github.com/facebook/react-native/assets/55885561/b86e14bd-bd9f-49eb-a42f-a347e48dc779
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu với trình tái hiện rn-textinput-cjk-issue được liên kết và so sánh hành vi của TextInput khi nhập tiếng Anh với khi nhập tiếng Hàn, tiếng Trung hoặc tiếng Nhật trên iOS. Theo dõi cách các thay đổi của TextInput được truyền đến logic tạo kiểu, sau đó xác minh rằng kiểu của các ký tự chẵn/lẻ được cập nhật trong khi nhập CJK mà không làm phát sinh hồi quy khi nhập tiếng Anh.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- ios, react-native
- Lĩnh vực
- mobile
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 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