[Koha-bugs] [Bug 32642] Loading spinner always visible when cover image is short (OPAC)

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Mar 29 15:54:16 CEST 2023


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32642

--- Comment #14 from Marcel de Rooy <m.de.rooy at rijksmuseum.nl> ---
Thx for this new attempt.
We now have:

$(coverSlide).addClass("cover-slides");
var img = $(coverSlide).find(".cover-image:visible").find("img")[0];
if( $(img).length > 0 && img.complete && img.naturalHeight > 0 ){
    $(coverSlide).css({"background-image":"none"});
}

What I wonder, is: will there always be enough time to locally complete the
downloading of the image before you remove the spinner?
Now you add the spinner by adding the class. And directly you check if there is
one visible image and you remove the spinner. (You could btw remove the class
again instead of the css change.)

So should we remove the spinner class in image onload and check image.complete
there?

See next comment.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list