chaodyz / ngx-line-truncation

An Angular line truncating solution. Truncate text block by given line number and add ellipsis to the end.

Home Page:https://line-truncation-site.appspot.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Line sometimes stays hidden

ronnc opened this issue · comments

commented

https://github.com/DiZhou92/ngx-line-truncation/blob/6423a7b9ac9e70b87160427ce35905cc0a845937/projects/line-truncation-lib/src/lib/line-truncation.directive.ts#L135

Hi there, thanks for the cool library. However, I find that sometimes the element style is still hidden after rendering.

It happens randomly and I don't have a small test case for you but I though it is worth raising it here in case you can see anything obvious.

Could it be possible that clientHeight is <=0 ?

it's hard to say the problem without looking at a specific case, can you provide one?

close because there was no further conversation

I think I've been able to replicate this issue:
Screen Shot 2020-07-30 at 11 44 15 AM

You can see the p tag has text content but also the style is set to hidden still.

@DiZhou92 I've created a StackBlitz with some of the minimum elements from my app to hopefully replicate the issue:
https://stackblitz.com/edit/ionic-dpbvci. I've attached a zip of it as well. Typically the post information is coming from and API, but it was difficult for me to mimic that without giving away some sensitive information.
ionic-dpbvci.zip