Data at Your Fingertips: Explore Our New Reporting and Statistical Capabilities By Ryan Ashbrook Yesterday at 01:29 PM
G17 Media Posted January 1 Share Posted January 1 (edited) Hello, I've discovered a bug in how IPS' lazyloading works on dynamic elements. in ./dev/js/library/app.js, line 61, you define a hook/override for $.fn.html. This makes sure that if dynamically loaded HTML contains lazyload elgible content, you instate the lazyload handler on it. The problem seems to be instead of looping each lazyload element, ips.utils.lazyLoad.observe is called on the entire element. This then registers the IntersectionObserver on the entire element, causing each lazyloading element to be loaded straight away, defeating the point of the lazyload. The fix is to instead call ips.utils.lazyLoad.observe on each lazyload capable element, like it's done elsewhere in the suite. I have patched this locally, but thought it would be useful to share to the IPS developers. Happy new year! Edited January 1 by G17 Media WP V0RT3X, SeNioR- and DamonT 3 Link to comment Share on other sites More sharing options...
G17 Media Posted February 1 Author Share Posted February 1 (edited) Bump - this is a big issue for forums which are image or embed heavy and go beyond 1 page. This would also benefit those Cloud customers to fix 😉 Edited February 1 by G17 Media SeNioR- and Afrodude 1 1 Link to comment Share on other sites More sharing options...
SeNioR- Posted February 1 Share Posted February 1 Bump2 Afrodude 1 Link to comment Share on other sites More sharing options...
Afrodude Posted February 1 Share Posted February 1 5 hours ago, G17 Media said: This would also benefit those Cloud customers to fix 😉 G17 Media 1 Link to comment Share on other sites More sharing options...
Stuart Silvester Posted February 2 Share Posted February 2 17 hours ago, SeNioR- said: Bump2 Bump3 I've logged an internal bug report so we can evaluate further. We do want to move more towards the native browser lazyload (such as we've done in Gallery) however we need to consider the trade-offs. The native functionality also has the same drawback as this bug where it won't work on dynamically loaded content. SeNioR-, G17 Media and Afrodude 1 2 Link to comment Share on other sites More sharing options...
Recommended Posts