jmenglis / clamp-js-main

Clamps an HTML element by adding ellipsis to it if the content inside is too long - Originally from both xavi160 & josephschmitt
https://github.com/josephschmitt/Clamp.js/
26 stars 18 forks source link

Clamp Js Not working on Display:None elements (Firefox,Safari,Etc) #5

Open aachavarria opened 6 years ago

aachavarria commented 6 years ago

It is just working on Chrome

jmenglis commented 6 years ago

Quite possibly. I will test multiple browsers today. IE, Firefox, Safari and Chrome all change their line height pretty often.

jmenglis commented 6 years ago

Looks like Internet Explorer 11 and Chrome are working. I didn't get a chance yet to test both Firefox and Safari. Will do so this evening.

ferronsw commented 6 years ago

I'm having the same issue.

ferronsw commented 6 years ago

This problem occurs, because element.clientHeight === 0 when display is set to none.