Last modified: 2011-05-14 17:56:13 UTC
<div style="width:100px"> <div id="foo">This is a really long sentence that doesn't fit in here at all without wrapping</div> <div id="bar">This is a really long sentence that doesn't fit in here at all without WRAPPING</div> <div id="baz">This is a really long sentence that doesn't fit in here at all without wrapping</div> </div> Run: $('#foo').autoEllipsis(); // foo is trimmed in the middle $('#bar').autoEllipsis({position:'right'}); // bar is trimmed at the end $('#baz').autoEllipsis({position:'right'}); // baz is trimmed IN THE MIDDLE, that's wrong The reason this happens is that autoEllipsis caches the ellipsized version of the string without taking the position option into account. #foo and #baz have the exact same text, so the cache entry is (wrongly) reused.
Fixed in r88115