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

Ellipsis is included in html tag if clamp happens inside a html tag (on Firefox) #12

Open haoruiqian opened 6 years ago

haoruiqian commented 6 years ago

Please try this codepen example with Firefox https://codepen.io/haoruiqian/pen/pxROZp

Here is whole content to be clamped. A Tried Triedd C B Tried to install MS Office 2010 professional. <strong>Asks for Windows</strong> CD which is not available

I set clamp to 2, and it clamped at Asks for Wi then wrapped them into the original html tag <strong>, but the appended ellipsis was included into the html tag.

screen shot 2018-10-10 at 21 27 30
jmenglis commented 6 years ago

I will be able to get to this over the weekend.