Skip to content

Node.js based forum software built for the modern web

Merge pull request #4530 from BenLubar/delay-image-loading

Julian Lam352ef81e8495
diff --cc public/src/client/topic/posts.js
index 841d0532ee,9ad98eae97..630b91bc72
--- a/public/src/client/topic/posts.js
+++ b/public/src/client/topic/posts.js
@@@ -262,11 -265,8 +264,11 @@@ define('forum/topic/posts',
var images = components.get('post/content').find('img[data-state="unloaded"]'),
visible = images.filter(function() {
- return config.delayImageLoading ? utils.isElementInViewport(this) : true;
+ return utils.isElementInViewport(this);
}),
+ posts = $.unique(visible.map(function() {
+ return $(this).parents('[component="post"]').get(0);
+ })),
scrollTop = $(window).scrollTop(),
adjusting = false,
adjustQueue = [],