trunk8 icon indicating copy to clipboard operation
trunk8 copied to clipboard

"Lines" parameter bugged in IE9

Open ghost opened this issue 12 years ago • 5 comments

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?

ghost avatar Oct 24 '13 12:10 ghost

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.

rviscomi avatar Oct 25 '13 07:10 rviscomi

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 avatar Oct 25 '13 09:10 ghost

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

  • Go to www.thredup.com/shop/women
  • Try $("#item-subset .info .item-title").trunk8({lines: 2}). This will truncate the titles of the items below the "Editor's Picks" to 2 lines in Chrome (as expected), but to 1 in IE. 3 lines will truncate to 2 lines in IE like explained in the first post.

Let me know if I can be of any help

ghost avatar Nov 05 '13 17:11 ghost

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

rviscomi avatar Nov 06 '13 07:11 rviscomi

IE9 and IE10 are now EOL.

graingert avatar Jan 26 '17 11:01 graingert