You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Android] Ellipsis is drawn black when numberOfLines cuts a Text at an inline view (0.89 RC) #60391
When numberOfLines cuts a <Text> at an inline <View> on Android, the ellipsis is drawn black instead of in the text's color. On a dark background it can be almost invisible. I see it on 0.89.0-rc.3 and on main (0.90.0-nightly-20261130-868828f0d).
The black comes with enablePreparedTextLayout, which is on by default since #59152. In dark mode, 0.88.1 draws the same ellipsis light grey, and so does 0.89.0-rc.3 with the flag off (I only ran that one at a font scale of 1.3). That isn't the text's color either, but it can be read.
From the source: an inline view's placeholder has no text style, so the ellipsis that stands for it is drawn with the layout's paint. TextLayoutManager.newPaintWithAttributes makes a new TextPaint, which is black by default. updateTextPaint sets its size, typeface and letter spacing, but not its color, and PreparedLayoutTextView doesn't set one when it draws.
To check this on 0.89.0-rc.3, I set each prepared layout's layout.paint.color to baseTextAttributes.color from the app, by reflection, and redrew. The ellipsis then had the text's color. I haven't built React Native with a fix. Setting the paint's color in updateTextPaint when isColorSet is true should be enough, with resetTextPaint resetting it like the other attributes.
Steps to reproduce
Run the reproducer below on Android: RNTester, Playground tab. Its component also runs as is in a new app. It uses the system font, and I ran it at a font scale of 1.0.
Both lines are white and cut to one line, the second one at an inline view.
The first line's ellipsis is white. The second line's is black, and should be white too.
Activity