A platform for community discussion. Free, open, simple.
FIX: image rendered temporarily in wrong position while loading
Samd0f38dbb071b
diff --git a/app/assets/javascripts/discourse/lib/lazy-load-images.js.es6 b/app/assets/javascripts/discourse/lib/lazy-load-images.js.es6index c159fe620a5..b291fcdc94f 100644--- a/app/assets/javascripts/discourse/lib/lazy-load-images.js.es6+++ b/app/assets/javascripts/discourse/lib/lazy-load-images.js.es6@@ -47,8 +47,8 @@ function show(image) {copyImg.srcset = imageData.srcset || copyImg.srcset;copyImg.style.position = "absolute";- copyImg.style.top = 0;- copyImg.style.left = 0;+ copyImg.style.top = `${image.offsetTop}px`;+ copyImg.style.left = `${image.offsetLeft}px`;copyImg.style.width = imageData.width;copyImg.style.height = imageData.height;