rviscomi / trunk8

jQuery Truncation Plugin -- THIS PROJECT IS NO LONGER MAINTAINED
MIT License
703 stars 95 forks source link

"Lines" parameter bugged in IE9 #39

Open ghost opened 10 years ago

ghost commented 10 years ago

I'm doing a simple $(element).trunk8({ lines: 2 }) Which works great on mosts browsers.

However, in IE9 (did not test other versions of IE). It gets truncated at the end of the first line. Doing the same things with lines: 3 cuts it at the end of the second line, etc...

Had a quick look, the only difference I noticed is that on line 137, when we do line_height = utils.getLineHeight(this) * settings.lines the result of utils.getLineHeight(this) is different (21 on IE, 20 on Chrome).

This is most likely a display difference though, and I can't picture this would be the cause of the bug. Any ideas?

rviscomi commented 10 years ago

Could you reproduce this on jsFiddle or some other site you can send me the source code? I'd like to try an debug it.

ghost commented 10 years ago

We're about to push on update on our website that will contain this trunk8 feature, as it's not critical. I'll let you know when we do and give you a link where the issue happens. (has it's full Front End, the debugger tools should suffice). If I find some time before that I'll have a quick stab at it.

ghost commented 10 years ago

If you still want to have a look at it, here is the place where you can reproduce it:

Let me know if I can be of any help

rviscomi commented 10 years ago

Sorry, hard to debug when the JS is minified. Is there a jsfiddle or similar that you could post?

graingert commented 7 years ago

IE9 and IE10 are now EOL.