Skip to content

Web Inconsistency: Node has wrong height and text is clipped #504

Description

@rigdern

Bug expressed using React Native components:

<View style={{"position":"absolute","left":0,"right":0,"alignItems":"flex-start","height":375,"marginTop":20}}>
  <View style={{"overflow":"hidden","justifyContent":"flex-end","height":99}}>
    <View>
      <View style={{"flexGrow":1,"flexShrink":1,"flexDirection":"row","backgroundColor":"steelblue"}}>
        <View>
          <Text>Line One</Text>
          <Text style={{"flexGrow":1,"flexShrink":1}}>Line Two</Text>
        </View>
      </View>
    </View>
    <View style={{"height":22,"width":22,"backgroundColor":"orange"}} />
  </View>
</View>

Expected result

Both lines are visible and the blue box is just tall enough to fit the text (JSFiddle: https://jsfiddle.net/w71q2oc6/1/). This is how it lays out on web and in the version of Yoga that shipped with React Native 0.34.0-rc.0.

image

Actual result

First line is clipped and the blue box is too tall.

image

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions