-
Notifications
You must be signed in to change notification settings - Fork 24.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Image nested In Text with lineHeight specified overflows container #48727
Comments
Warning Could not parse version: We could not find or parse the version number of React Native in your issue report. Please use the template, and report your version including major, minor, and patch numbers - e.g. 0.76.2. |
Warning Could not parse version: We could not find or parse the version number of React Native in your issue report. Please use the template, and report your version including major, minor, and patch numbers - e.g. 0.76.2. |
I also tried reproducing this issue it is happening on both the platforms, looks like a valid issue |
The same issue applies to the |
Fixed the issue |
Description
An
<Image>
nested within<Text>
with alineHeight
specified causes the image to overflow the parent container.Workarounds attempted:
<View>
with a fixedheight
and/orlineHeight
<Text>
with a fixedheight
and/orlineHeight
<Text>
with lineHeight set toundefined
ornull
Expected behaviour:
To be able to nest images in Text with a non-default lineHeight.
(Please let me know if any more details are required for this issue. Thanks!)
Steps to reproduce
Please see expo snack.
Code below:
React Native Version
0.76.0
Affected Platforms
Runtime - iOS, Runtime - Android
Output of
npx react-native info
Stacktrace or Logs
Reproducer
https://snack.expo.dev/@tomkelsey/image-nested-in-text-lineheight-bug
Alternative reproducer:
https://github.com/OzymandiasTheGreat/rn-view-in-text-bug
Screenshots and Videos
Without lineHeight specified:
With lineHeight specified:
The text was updated successfully, but these errors were encountered: