kamilkp / angular-vs-repeat

Virtual Scroll for AngularJS ngRepeat directive
http://kamilkp.github.io/angular-vs-repeat/
MIT License
818 stars 228 forks source link

items stuck between adding/removing cause scroll flicker #208

Closed defields923 closed 6 years ago

defields923 commented 6 years ago

I am back trying to use version 1.1.7 on a list of same-size elements. This is something I've done a few months back, but the change was never integrated into the code base, so I am updating it to get it merged. Now, however, when using the vs-repeat directive alone, if I scroll down a slight bit, it seems like the scroll can stop at awkward positions, causing the min-height of vs-repeat-before-content to flicker between two values, and it seems like either the first and last element to be added/removed continuously.

I've tried vs-excess to no success. Latch helps, but it defeats the purpose. Is there something I'm missing?

*Again, I had this working a couple months back with the exact same list.

defields923 commented 6 years ago

Providing the calculated height to the vs-repeat directive solved the issue.

kerryj89 commented 2 years ago

For me it was due to the ng-repeat items being an anchor tag. Changing it to div made it work. I changed it back to anchor, removed href and added display: block !important inline styling just to see if it would suddenly work again but it went back to scroll spazz mode. 🤷 You can replicate this by changing the ng-repeated elements from <div> to <a> in this guys demo https://plnkr.co/edit/HlOVKc?preview