tiny-slider icon indicating copy to clipboard operation
tiny-slider copied to clipboard

Height of slider wrong with lazy loaded images

Open tyssen opened this issue 4 years ago • 2 comments

Issue description:
We're using LazySizes for lazy-loading images (although the same thing occurs when using Tiny Slider's built-in method) and until the images have all been loaded, or until the window is resized, the height of the slider is too tall (see below).

Screen Shot 2020-10-19 at 11 29 06 am

This is what it looks like after all the images have loaded:

Screen Shot 2020-10-19 at 11 29 23 am

Is there any way to fix this issue?

Demo link/slider setting:

Tiny-slider version: 2.9.3 Browser name && version: All browsers OS name && version: Only tested on Mac so far

tyssen avatar Oct 19 '20 01:10 tyssen

+1 same issue on 2.9.3 with lazy-load tested only on macos (chrome)

maybe #403 can help

dimaloop avatar Oct 21 '20 21:10 dimaloop

To Whom might endup here through Google: Without any Code Example to test this, Id try the Following.

Listen to the lazyloaded Event and update the sliderHight using its buildin Function

document.addEventListener('lazyloaded', ()=>{
            slider.updateSliderHeight();
        });

aicma avatar Jul 24 '23 09:07 aicma