[iOS] The styling does not change when the CJK character enter TextInput
まだ誰も着手していません。
- 主要言語
- C++
- スター
- 127k
- フォーク
- 25.3k
- 平均マージ
- 1日 23時間
- マージ済み PR(30日)
- 4
説明
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
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
リンクされた rn-textinput-cjk-issue の再現手順から始め、iOS で英語を入力する場合と、韓国語、中国語、日本語を入力する場合の TextInput の動作を比較します。TextInput の変更がスタイリングロジックにどのように伝播されるかを追跡し、英語入力を退行させることなく、CJK 入力中に偶数/奇数文字のスタイリングが更新されることを確認します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- ios, react-native
- 領域
- mobile
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100