harm-less / angular-sticky

Pure javascript AngularJS directive to make elements stick when scrolling
http://harm-less.github.io/angular-sticky
83 stars 38 forks source link

bug with width #24

Closed Krysztal closed 6 years ago

Krysztal commented 7 years ago

bad width after hide->show element (#element). Problem with method (line 309): function elementWidth() { return nativeEl.offsetWidth; } because after hide this method set width to 0 and after show set always 0.

`

Test
<div>
    <br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
    1
    <br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
    2
    <br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
</div>

</div`

harm-less commented 7 years ago

Is this just to make your point or do you need such a high sticky element?