[iOS] The styling does not change when the CJK character enter TextInput
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- C++
- Estrellas
- 127k
- Forks
- 25.3k
- Merge medio
- 1 d 23 h
- PR fusionados (30 d)
- 4
Descripción
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
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Comienza con el reproductor vinculado rn-textinput-cjk-issue y compara el comportamiento de TextInput al introducir inglés frente a coreano, chino o japonés en iOS. Rastrea cómo se propagan los cambios de TextInput a la lógica de estilos y verifica después que el estilo de los caracteres pares/impares se actualiza durante la entrada de CJK sin provocar regresiones en la entrada de inglés.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- ios, react-native
- Área
- mobile
- Tipo de issue
- Error
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100