Skip to content

Chip's content truncated on some devices #4652

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

Open
MCCVargues opened this issue Mar 11, 2025 · 1 comment
Open

Chip's content truncated on some devices #4652

MCCVargues opened this issue Mar 11, 2025 · 1 comment

Comments

@MCCVargues
Copy link

Current behaviour

I noticed that on some android devices one of our chips would be truncated. After digging deeper we found out that it happened when the chip text consists of two space separated words with a total length of 10. Then and only then will it truncate the text. There are some more edge cases, I noticed when I typed the alphabet, it would be truncated, except if I stopped at f and replicated that (abcdeffff).

It is not a really big problem, a simple space at the end of the text fixes the problem, but it is really weird.

Expected behaviour

Text should not be truncated in the above case, or at least, we should have an option to disable it.

How to reproduce?

Create a Chip and set the text to two space separated words with a total string length of 10. On some devices, such as my samsung galaxy S21, it will cause the Chip to be truncated.

<Chip>aaaa bbbbb</Chip>

Preview

Image

What have you tried so far?

Tried completely removing all styles, rebuilding on device, restarting device and of course different combinations of text

Your Environment

software version
ios x
android 14
react-native 0.74.5
react-native-paper 5.12.5
node x.x.x
npm or yarn x.x.x
expo sdk 51.0.39
@MCCVargues MCCVargues added the bug label Mar 11, 2025
@MCCVargues
Copy link
Author

I did a crude fix/workaround by adding 11 zero width unicode characters after the text to increase the number of characters over 10. copy the character in there to reproduce <​​​​​​​​​​>.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants