فهرست منبع

avoid unnecessary infinite scroll loadUntilFull calls

allow the dom to update before checking if more data is needed
Brian Gough 11 سال پیش
والد
کامیت
c29714f427
1فایلهای تغییر یافته به همراه3 افزوده شده و 1 حذف شده
  1. 3 1
      services/web/public/coffee/ide/track-changes/directives/infiniteScroll.coffee

+ 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()