Image nested In Text with lineHeight specified overflows container #48727
Labels
Component: Image
Component: View
Issue: Author Provided Repro
This issue can be reproduced in Snack or an attached project.
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
Screenshots and Videos
Without lineHeight specified:
With lineHeight specified:
The text was updated successfully, but these errors were encountered: