Description
On Android, since Expo SDK 54 / React Native 0.81, the TextLayoutEvent nativeEvent.lines array can have more lines than the text actually has.
The bug only occurs with some strings (in my example, I have the bug with the string AAAA, but not with the string AAA).
I was able to reproduce the bug when the text is centered in a view (alignItems: 'center' on the parent view), and not when I remove the alignItems: 'center'.
Finally, I think the bug depends on device's screen dimensions, because on Expo Snack, with my example string, I have the bug on a Pixel 8, but not on a Pixel 9 Pro.
Steps to reproduce
- Launch the Snack
- Select an Android device and a Pixel 8 model
- Observe: on the device, the text is rendered on one line, but in the logs,
e.nativeEvent.lines.length returns 2
React Native Version
0.81.5
Affected Platforms
Runtime - Android
Output of npx @react-native-community/cli info
N/A since I'm using Expo Snack
Stacktrace or Logs
N/A since it's not a crash
MANDATORY Reproducer
https://snack.expo.dev/@victorpe/bug---text-layout-event-reports-multiple-lines-for-single-line-text-on-android?platform=android
Screenshots and Videos

Description
On Android, since Expo SDK 54 / React Native 0.81, the TextLayoutEvent
nativeEvent.linesarray can have more lines than the text actually has.The bug only occurs with some strings (in my example, I have the bug with the string
AAAA, but not with the stringAAA).I was able to reproduce the bug when the text is centered in a view (
alignItems: 'center'on the parent view), and not when I remove thealignItems: 'center'.Finally, I think the bug depends on device's screen dimensions, because on Expo Snack, with my example string, I have the bug on a Pixel 8, but not on a Pixel 9 Pro.
Steps to reproduce
e.nativeEvent.lines.lengthreturns 2React Native Version
0.81.5
Affected Platforms
Runtime - Android
Output of
npx @react-native-community/cli infoStacktrace or Logs
MANDATORY Reproducer
https://snack.expo.dev/@victorpe/bug---text-layout-event-reports-multiple-lines-for-single-line-text-on-android?platform=android
Screenshots and Videos