Skip to content

[Reproducer] Text drops its last line when its box crosses y = 2048 on a 3x iOS screen (#58970) - #58972

Draft
ybelakov wants to merge 1 commit into
react:mainfrom
ybelakov:repro/text-last-line-2048
Draft

ybelakov wants to merge 1 commit into
react:mainfrom
ybelakov:repro/text-last-line-2048

Conversation

@ybelakov

@ybelakov ybelakov commented Oct 9, 2026 •

Copy link
Copy Markdown

Summary

Reproducer for #58970, not for merging: it only replaces RNTesterPlayground.js, as the issue template asks.

A wrapped <Text> whose box crosses y = 2048 in the scroll content draws one line short on a 3x iOS screen (New Architecture). Yoga's roundLayoutResultsToPixelGrid subtracts the two rounded edges as floats; with the top below 2048 and the bottom above, the height comes out one float step short (43.9998779296875 instead of 44 for two lines of lineHeight: 22). RCTParagraphComponentView hands that box to TextKit as the container size, the second line "doesn't fit", and the text is laid out in the container's clip mode as one line. Fix for the Yoga half: react/yoga#2037.

Changelog:

[INTERNAL] - Reproducer for #58970, not for merging.

Test plan

Open the Playground example in RNTester on a 3x iOS simulator or device (iPhone 16 Pro). It renders 12 two-line texts positioned absolutely around y = 2048 and scrolls to them.

  • Expected: every box shows "top …" and "second line".
  • Actual: the boxes crossing 2048 on a fraction ("top 2028+1/3" and "top 2028+2/3" with nothing above the example) show only their first line, and the console logs:
box top=2028.3333333333333: 1 line(s)
box top=2028.3333333333333: height 43.9998779296875
box top=2028.6666666666667: 1 line(s)
box top=2028.6666666666667: height 43.9998779296875

…n a 3x iOS screen

Reproducer for react#58970, not for merging: a grid of two-line Texts
positioned absolutely around y = 2048. The ones crossing 2048 on a
fraction get a 43.9998779296875pt box from Yoga and TextKit lays out only
their first line.
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Oct 9, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant