Răsfoiți Sursa

avoid unnecessary infinite scroll loadUntilFull calls

allow the dom to update before checking if more data is needed
Brian Gough 11 ani în urmă
părinte
comite
c29714f427

+ 3 - 1
services/web/public/coffee/ide/track-changes/directives/infiniteScroll.coffee

@@ -26,7 +26,9 @@ define [
 					if (listShorterThanContainer() or atEndOfListView()) and not scope.$eval(attrs.infiniteScrollDisabled)
 						promise = scope.$eval(attrs.infiniteScroll)
 						promise.then () ->
-							loadUntilFull()
+							setTimeout () ->
+								loadUntilFull()
+							, 0
 
 				element.on "scroll", (event) ->
 					loadUntilFull()