Hi,
I have noticed my website is getting a pretty bad score on CLS (layout shift). It seems like GDThumb and Gthumb+ is causing this issue. When the page it loading it will throw all images on screen, and after only half a second it will sort them correctly.
Is there a way to make the images only appear when Gthumb+ is ready sorting the images? That way Google wont complain.
Thanks in advance!
Offline
Included in the upcoming 1.0.25 is this change to improve anti-flicker / CLS
/js/gdthumb.js
init: function() { var mainlists = jQuery('ul.thumbnails'); if(typeof mainlists !== 'undefined') { mainlists.hide(); } if (GDThumb.do_merge) { GDThumb.merge(); } GDThumb.build(); jQuery(window).bind('RVTS_loaded', GDThumb.build); if(typeof mainlists !== 'undefined') { mainlists.resize(GDThumb.process); mainlists.show(); } jQuery("ul.thumbnails .thumbLegend.overlay").click( function() { window.location.href = $(this).parent().find('a').attr('href'); }); jQuery("ul.thumbnails .thumbLegend.overlay-ex").click( function() { window.location.href = $(this).parent().find('a').attr('href'); }); },
Offline
This change in 1.0.25 is causing freeze of my gallery home page in Firefox (looks like deadlock in JS script). It seems to be ok in Chrome, Edge and Vivaldi.
Last edited by MiPi (2022-11-01 14:20:43)
Offline
cannot reproduce
could you provide a link?
Offline
Sure, I returned back 1.0.25 version, only let me know when I can return working version back, with this code it is unusable in Firefox: https://mpilar.cz/foto/
I tried Firefox 106.0.3. in safe mode without any extensions, tried switch off my other Piwigo extensions, but no change at all.
Last edited by MiPi (2022-11-02 08:02:43)
Offline
Now reproduced also with Chrome, some never ending recurse ended in call stack size exceeded in JQuery from bootstrap_darkroom. It seems the problem occurs during getting width or height on the element and calling jQuery.css( elem, type, extra )
Last edited by MiPi (2022-11-02 08:41:42)
Offline
I have the same issue as mentioned by MiPi.
I deleted gdThumb 1.0.25 and re-installed 1.0.24. Now my gallery works again.
Updating to 1.0.25 will break the gallery again. I also use bootstrap_darkroom as theme.
Best regards, Sascha
Last edited by astrastudio (2022-11-03 11:57:21)
Offline
I returned back file from version 1.0.24, I do not want to have inaccessible site for so long. In case you would need to debug it on my site, let me know when. But I think you should be able to reproduce it with bootstrap_darkroom, I do not have anything special on my site.
Offline
It prevents display of the homepage entirely for me, in both Edge and Chrome. I have reverted back to 1.24
If you want an example I am happy to reinstall 1.25 as it is easily reproducible. Also does not appear theme related as i tried several all with the same result.
Offline
version 1.0.26
- Removed antiflicker logic as not working in some browsers
Offline