Explorar o código

Recalc sticky column on lazy img load

https://github.com/FreshRSS/FreshRSS/issues/1593
Alexandre Alapetite %!s(int64=8) %!d(string=hai) anos
pai
achega
eb84d4f8ff
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      p/scripts/main.js

+ 1 - 0
p/scripts/main.js

@@ -227,6 +227,7 @@ function toggleContent(new_active, old_active) {
 
 	if (context.does_lazyload) {
 		new_active.find('img[data-original], iframe[data-original]').each(function () {
+			this.onload = function () { $(document.body).trigger("sticky_kit:recalc"); };
 			this.setAttribute('src', this.getAttribute('data-original'));
 			this.removeAttribute('data-original');
 		});