Controlled TextInput broken for Chinese (and other languages) in v0.54 on iOS
See original GitHub issueControlled TextInput
breaks the Chinese pinyin keyboard’s autocomplete feature. A similar issue was raised a year and a half ago (#8265) and fixed by #7496. However, it appears that others are having the same problem (#12599, #18260, #18379), but re-filing the issue with the template filled out and an example to reproduce.
Note that this works correctly in v0.53. This may have something to do with the big Text
, TextInput
refactor that dropped with v0.54 (Thanks, btw, @shergin and @hovox!).
I’ve included both a working (v0.53) and broken (v0.54) example below.
Environment
Environment: OS: macOS High Sierra 10.13 Node: 9.3.0 Yarn: 1.3.2 npm: 5.6.0 Watchman: 4.9.0 Xcode: Xcode 9.2 Build version 9C40b Android Studio: Not Found
Packages: (wanted => installed) react: 16.2.0 => 16.2.0 react-native: 0.54.0 => 0.54.0
Expected Behavior
Typing on a US keyboard would bring up Chinese characters corresponding to letters typed.
Actual Behavior
Each new letter typed is considered individually, instead of along with the previous untranslated characters.
Shamelessly stealing an image from @ForU who did a nice job of showing the issue:
Steps to Reproduce
Unfortunately, expo hasn’t updated to the latest version of React Native. I’ve prepared a small project that demonstrates the issue here. There is a working version on a branch here; same project, just using RN v0.53 instead of v0.54.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:20
- Comments:39 (12 by maintainers)
Top GitHub Comments
I updated the pull request and the sample app. And I tried one of Chinese keyboards. I hope it’s expected behavior.
if it has prop value or defaultvalue,you can’t input Chinese