An empty Text
elements causes its parent to span vertically, printing a "ghost line"
#32062
Labels
Text
elements causes its parent to span vertically, printing a "ghost line"
#32062
Description
This snippet:
will render as:
Also note that the height of this spanning behavior is not influenced by
lineHeight
style.Discussion
One would expect that an empty
Text
element has a zero-width and height, similarly to an empty<span>
element in HTML. I would expect instead the below snippet to render as seen in the attached screenshot:Instead, this latter snippet renders visually like 2 lines.
React Native version:
Steps To Reproduce
Provide a detailed list of steps that reproduce the issue.
Text
element inside aView
;View
spanning somewhere around 20px in height.Expected Results
The parent
View
should have a zero height.Snack, code example, screenshot, or link to a repository:
https://github.com/jsamr/react-native-empty-text-spans-bug
The text was updated successfully, but these errors were encountered: