zInfiniteScroll icon indicating copy to clipboard operation
zInfiniteScroll copied to clipboard

flicker problem when scroll up

Open LightZam opened this issue 8 years ago • 0 comments

http://stackoverflow.com/questions/38042498/angular-scrolltop-ng-repeat-data-flicker

i'm trying to create facebook like reverse infinite scroll solution for chat history, but i have run into problem. I have a fairly simple code. 1.) Get current div scrollHeight 2.) push data into array | ng-repeat updates data 3.) update scrollTop And everything sort of works, except that i have to use timeout to get updated scrollHeight and then it causes a flicker http://lightzam.github.io/zInfiniteScroll/example04_normalScroll_inverse.html This is what i mean by flicker. It renders data first and then does the scrollTop. So my question is how can i get the updated scrollHeight before ng-repeat updates the view.

LightZam avatar Aug 30 '16 11:08 LightZam