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
[0.86] Fix iOS text losing its last line far down a scroll view (Yoga pixel-grid rounding) #1455
Picks the Yoga sync commit 4de5b675 ("Round node dimensions in double so far-off nodes keep their full size", react/yoga#2037, reviewed by @cortinico), which fixes react/react-native#58970. 0.86 is the React Native of Expo SDK 57, where two of the confirmed reports come from.
Problem: A node's rounded width and height are the difference of its two rounded absolute edges, and that difference was taken in float. Far from the origin a float has fewer bits than a pixel, so when the two edges fall on either side of a power of two they are quantized differently. A two-line <Text> spanning y = 2048 on a 3x screen comes out 43.9998779 tall instead of 44, one float step short of what it was measured at, and TextKit then drops its last line: the words squeeze onto the line above, get cut at the right edge, and an empty line is left below.
Impact: Any wrapped <Text> with a fractional lineHeight placed roughly 2048 points down a ScrollView or list on a 3x iPhone (and again near 4096). Confirmed by three production apps on the issue: 0.86.3 / Expo SDK 57 (iPhone 12 Pro Max), 0.85.3 / Expo SDK 56 (iPhone 13 Pro Max, iOS 27) and the original report. Users see missing words in long reading content; the only workaround is a JS-side lineHeight nudge of +0.001 applied app-wide.
Risk: Low. It changes only ReactCommon/yoga/yoga/algorithm/PixelGrid.cpp (+31/−16): the rounding is done in double and narrowed to float after the subtraction, the public roundValueToPixelGrid keeps its signature, and the Yoga PR carries unit tests covering both fractions on either side of 1024, 2048 and 4096. I checked that the commit applies cleanly to 0.86-stable with git apply --check.
The follow-up fd539249 (react/yoga#2040, text nodes keep their measured pixel size) also applies cleanly on top and would be a welcome companion, but 4de5b675 alone resolves #58970.
The same commit was picked into 0.88-stable in #1454 and shipped in 0.88.1 without conflicts. 0.86 is the React Native version in Expo SDK 57, where two of the confirmed reports come from. Could it go into the last 0.86 patch before 0.86 leaves support?
Activity
ybelakov commentedon Nov 18, 2026
The same commit was picked into 0.88-stable in #1454 and shipped in 0.88.1 without conflicts. 0.86 is the React Native version in Expo SDK 57, where two of the confirmed reports come from. Could it go into the last 0.86 patch before 0.86 leaves support?