kenwheeler / slick

the last carousel you'll ever need
kenwheeler.github.io/slick
MIT License
28.33k stars 5.88k forks source link

Minified version of slick JS may not act exactly as full slick JS #4164

Open salsero-coding opened 2 years ago

salsero-coding commented 2 years ago

short description of the bug / issue, provide more detail below. I just spent few hours trying to find a problem which turned out to be an error in the minified version of slick.js I haven't tracked exactly where the problem was in the minified version, but after I minified myself the full slick.js the problem dissappeared.

====================================================================

[ paste your jsfiddle link here ]

Here's a fiddle to reproduce this bug: https://jsfiddle.net/aL0mqbuh/

====================================================================

Steps to reproduce the problem

  1. Using Chrome or Firefox on desktop, move either once or twice the upper slider with a mouse to the left, and see how the navigation slider below is also moving to the left (in this case it shouldn't)
  2. In the code above change source of the script from:

    to:

  3. Reload the page and perform task from step 1. and observe a different (correct) reaction of the bottom navigation slider.

====================================================================

What is the expected behaviour?

When using slick.js version navigation slider are not shifted while in the visible area.

====================================================================

What is observed behaviour?

When using slick.min.js version navigation slider shifts slides unnecessarily.

====================================================================

More Details

Independently of the expected behaviour, the main issue is that minified version provides different behaviour than the full, unminified version, which is to be expected.