pvdspek / jquery.autoellipsis

Auto-ellipsis plugin for jQuery
http://pvdspek.github.com/jquery.autoellipsis
MIT License
142 stars 32 forks source link

wrong handling only one children if children larger than parent #16

Open dom1nga opened 11 years ago

dom1nga commented 11 years ago

i use firefox 17.0.1. using plugin with {live: true} and css media queries. after loading page i get what expected, but only in one case, when children element is larger than parent it wrong truncate text. after resizing all looks ok. have to use spike <span>&nbsp;</span> before child element to make it works correctly.

code looks like this:

$('.div1').ellipsis({
   live: true
 })

.div0 {
  padding-top: 15px;
  padding-right: 15px;
}

.div1 {
  height: 205px;
  padding: 0;
  margin: 0;
}

<div class="div0">
  <div class="div1">
    <p>some long text makes this paragraph height more than 205px</p>
  </div>
</div>