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

Some times in Chrome scroll handler are called continuously #186

Closed dardino closed 6 years ago

dardino commented 6 years ago

I scroll one time with mouse wheel, the scroll event does not stop until reach the end of list. I have this problem only in Chrome and not in all cases. I tested the same page in Edge and Firefox and it works fine. What I need to know ? I don't understand the difference between working case and not working case. What can it be?

I have fixed height for items and fixed height for scrollarea

dardino commented 6 years ago

vs-repeat-bug.zip This is a plunker for test with Chrome: http://plnkr.co/edit/EsrysbLVE1yKyjt3JUkL?p=preview

To test fast scroll down the list

liu351 commented 6 years ago

I read you can add overflow-anchor: none to your .main css class. Worked for my project

napernik commented 6 years ago

Thanks, upgrading from 1.1.7 to 1.1.11 and using "overflow-anchor: none" on the scroll-able element solved the problem!

There seem to be an infinite recursive call, a side effect of which is raising the "scroll" event repeatedly. Here's a part of the call stack:

image

kerryj89 commented 2 years ago

Just want to point out that mine was solved by removing $index in ng-repeat - this somehow caused mine to continuously scroll down when loading in new items; solved by not using it: https://github.com/kamilkp/angular-vs-repeat/issues/95