[iOS] The styling does not change when the CJK character enter TextInput
Nessuno ha ancora preso questa issue.
- Lingua principale
- C++
- Stelle
- 127k
- Fork
- 25.3k
- Merge medio
- 1g 23h
- PR unite (30g)
- 4
Descrizione
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
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia con il riproduttore rn-textinput-cjk-issue collegato e confronta il comportamento di TextInput quando si inserisce l’inglese rispetto al coreano, al cinese o al giapponese su iOS. Traccia come le modifiche a TextInput vengono propagate alla logica di stile, quindi verifica che lo stile dei caratteri pari/dispari venga aggiornato durante l’input CJK senza introdurre regressioni nell’input in inglese.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- ios, react-native
- Ambito
- mobile
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100