Skip to content

[iOS] app hang when include CJK characters multiline TextInput  #14628

@yangyi

Description

@yangyi

Description

when using CJK chars in multiline TextInput, app hangs, and unresponsive.

Reproduction Steps

paste sample code in any page of your app, and navigate to the page

Sample Code

export default class App extends React.Component {
  render() {
    const text = <Text>王者荣耀</Text>
    return (
      <View style={styles.container}>
        <TextInput multiline>
          {text}
        </TextInput>
      </View>
    );
  }

I also provide an git repo https://github.com/yangyi/demoinput

Solution

I replace NaN with CGFLOAT_MAX, that resolve the issue, but I'm not sure why this happens, and the solution is not well tested.

the commit is here

yangyi@aadebd7

Additional Information

  • React Native version: v0.45.1
  • Platform: iOS
  • Development Operating System: macOS
  • Build tools: XCode Version 8.3.2 (8E2002)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions