Skip to content

Nesting an Image and a Text which has lineHeight in an Text will display wrong #17750

Description

@JosephPoplar

Is this a bug report?

Yes

Have you read the Contributing Guidelines?

Yes

Environment

OS: macOS High Sierra 10.13.2
Node: 8.9.1
Yarn: Not Found
npm: 4.6.1
Watchman: 4.9.0
Xcode: Xcode 9.2 Build version 9C40b
Android Studio: 3.0 AI-171.4408382

Packages: (wanted => installed)
react: 16.2.0 => 16.2.0
react-native: 0.52.0 => 0.52.0

Target Platform: iOS (11)

Steps to Reproduce

1.nest a Text with some text and an Image in a Text
2.give the nested Text a style with lineHeight 12
3.run the app

Expected Behavior

nest Text should render normal with lineHeight 12 , and there should be an Image below it.
rnbug-01

Actual Behavior

the Image was lost ,and the content of the nested Text render as one single line without line break.
rnbug-02

Reproducible Demo

https://snack.expo.io/@josephpoplar/reactnative-52-nesting-text-demo

Update

Environment

OS: macOS High Sierra 10.13.3
Node: 8.9.1
Yarn: Not Found
npm: 4.6.1
Watchman: 4.9.0
Xcode: Xcode 9.2 Build version 9C40b
Android Studio: 3.0 AI-171.4408382

Packages: (wanted => installed)
react: 16.2.0 => 16.2.0
react-native: 0.53.3 => 0.53.3

Still error in 53.0.

Demo

ReactNativeTextDemo.zip
please run npm install after opening the project.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Ran CommandsOne of our bots successfully processed a command.StaleThere has been a lack of activity on this issue and it may be closed soon.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions