React-native: TextInput value prop break Chinese character input

Created on 2 May 2018  路  13Comments  路  Source: facebook/react-native

Environment

Environment:
OS: macOS High Sierra 10.13.4
Node: 8.9.0
Yarn: 1.5.1
npm: 5.5.1
Watchman: 4.9.0
Xcode: Xcode 9.3 Build version 9E145
Android Studio: 3.0 AI-171.4443003

Packages: (wanted => installed)
react: ^16.3.2 => 16.3.2
react-native: ^0.55.3 => 0.55.3

Steps to Reproduce

export class Test extends React.PureComponent {

    state = {
        text: "",
    };

    render() {
        return (
            <View>
                <Text>test:</Text>
                <TextInput
                    value={this.state.text}
                    onChangeText={text => this.setState({ text })}
                />
            </View>
        );
    }
}

try input some Chinese using soft keyboard

Expected Behavior

Textinput works like Textinput in 0.51

Actual Behavior

Can't select Chinese character from pinyin.
It only works if value={this.state.text} is removed

TextInput Stale

Most helpful comment

I have the same problem.
react-native: 0.55.4

All 13 comments

I have the same issue.

same

same in ios

same issue on ios

This bug also affects other language as well (in my case Vietnamese)

I have the same problem.
react-native: 0.55.4

I have the same problem
react-native: 0.55.4

react-native: 0.55.4 with expo and I tried fixing

19087

18874

18456

but no success.

Same problem with Japanese

I have encounter same problem,I'm using chinese. And this PR work for me. https://github.com/facebook/react-native/pull/18456

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as "For Discussion" or "Good first issue" and I will leave it open. Thank you for your contributions.

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.

Was this page helpful?
0 / 5 - 0 ratings