-
Notifications
You must be signed in to change notification settings - Fork 24.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Text on Android]: setting selectable to true breaks the text truncation and lineHeight on Android #48921
Comments
what happens if you render something extra below the text? in your example, that would be below the red text (the actual text, not the label) |
@spyshower like this?
|
Feels like the |
I am not able to check your code in android atm, any chance you played with
as a nasty workout, I believe you will be able to get it to work if you specify a i will try to reproduce it later |
Thanks! |
True I guess... |
@dariakoko, I validated the repro and it seems to be working fine. Am I missing something? Screen.Recording.2025-01-27.at.7.51.17.PM.mov |
can you share the code too? :) |
@princektripathi hi! I still see the issue on the screenshot you provided - the text inside of the third yellow component is not truncated and cut out instead, am expecting three dots in the end of the line. @yogeshpaliyal thank you for looking into it too! I am not that familiar with the native code, but from what you described it looks like this would be the solution. The only minor issue I see from the screenshot you provided is the extra space before the three dots |
@dariakoko is the spacing issue is in 1st screenshot or 2nd one? |
@yogeshpaliyal first |
Description
I use Text component that has to contain selectable text and should be truncated if it extends the width of the parent component.
On iOS everything works fine. On Android if I set
selectable={true}
truncation and line height of the text are breaking.Steps to reproduce
selectable={true}
,numberOfLines={1}
React Native Version
0.75.4
Affected Platforms
Runtime - Android
Output of
npx react-native info
Stacktrace or Logs
Reproducer
https://github.com/dariakoko/text-component-on-android
Screenshots and Videos
The text was updated successfully, but these errors were encountered: