woocommerce / FlexSlider

An awesome, fully responsive jQuery slider plugin
http://www.woocommerce.com/flexslider/
GNU General Public License v2.0
4.91k stars 1.69k forks source link

slides to far #1767

Closed LPGGNecromant closed 2 months ago

LPGGNecromant commented 5 years ago

If u using the flex-direction nav-arrows (e.g. 1 click right) than wait like 5s and try using the keyboard in the same direction, the flexslider jumps 2 slides to far.

e.g.: Slide 0 use click at navitem slided to 1 wait 5s use keyboard right arrow slided to 3

tried to do an workaround but get the same:

        $(document).on('keyup', function(e){
            let cur = $('.flexslider.start').data('flexslider').currentSlide;
            let last = $('.flexslider.start').data('flexslider').last;
            if(e.keyCode == 39 && cur != last) {
                $('.flexslider.start').flexslider(cur + 1);
            }
            if(e.keyCode == 37 && cur != 0) {
                $('.flexslider.start').flexslider(cur - 1);
            }
        });   

seems like the current slide is setted up somehow in the 5s waiting.