stevenwanderski / bxslider-4

Responsive jQuery content slider
Other
4.22k stars 1.85k forks source link

Incorrect behaviour when quickly pressing next/prev. buttons #1213

Open ajax333221 opened 6 years ago

ajax333221 commented 6 years ago

If you double (or triple click) really quick the Next or Previous buttons the following might happen: -If "infiniteLoop" is false, And after calculating the final slide is out of bounds, the carousel will stop working Example A: if you are at 2/3 and you click twice at tries to go to the nonexistent 4th slide it will crash Example B: if you are at 1/3 and you click twice at tries to go to the 3th slide it will work BUT the pager will incorrectly display at 2/3 but the correct slide will be shown and after clicking Next or Prev the pager will reposition correctly and everything will be fine

With "infiniteLoop" set to true, the out of bounds crash will not happen but the pager will still incorrectly display the current slide (but as example B, it corrects itself after one normal Next or Prev.)

For now I will be using infiniteLoop to the default true, as crashing after a double click is not an option for me. Problem found on FireFox 59.0 (64-bits)

sunil-samuel commented 1 year ago

This is still an issue with the latest version of bxslider. But if you enable the 'useCss' option, then it will correct itself after you hit the prev/next links. That is, it doesn't crash and not work.