Skip to content
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

Module in Ionic show only one letter #71

Open
LFTroya opened this issue Feb 8, 2021 · 4 comments
Open

Module in Ionic show only one letter #71

LFTroya opened this issue Feb 8, 2021 · 4 comments

Comments

@LFTroya
Copy link

LFTroya commented Feb 8, 2021

Describe the bug
I am trying to use this package in Ionic React but it only show the first letter of the paragraph

image

To Reproduce
This is the repo to see the issue https://github.com/LFTroya/expenses

@JohnGeorgiadis
Copy link

I have the same issue with an ionic-react app. I am able to reproduce it only on web though.

@gabycperezdias
Copy link

Any news on this? I am facing this on my project directly on Web and also on Jest env...

@patrik-piskay
Copy link
Owner

I am not familiar with Ionic framework but it seems it does not fully support certain DOM methods, like getBoundingClientRect which returns 0 for all elements, making it impossible to calculate whether the truncated sub-text fits into its container. Same for the line-height package that react-truncate-markup uses to calculate line heights. It returns 0 too.

@arvinrey
Copy link

arvinrey commented Feb 1, 2024

@patrik-piskay I also experienced this, where it only shows one letter followed by the ellipsis. The scenario is that the container is displayed conditionally, so by default, it is hidden by css (display: none). When it becomes visible, the element to which I attached the react-truncate-markup is displaying something like 'C...' which is not correct.

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

No branches or pull requests

5 participants