metafizzy / flickity-imagesloaded

enables imagesLoaded option for Flickity
19 stars 16 forks source link

When flickity is focused, and tab is pressed, flickity scrolls to last slide. #5

Open nsallis opened 6 years ago

nsallis commented 6 years ago

I have a carousel with 5 slides. When I focus the carousel (click on a dot to move to for ex. slide #2), and hit tab, the carousel scrolls to the last slide (#5). I am using flickity-imagesloaded and initializing it like so:


      {
        accessibility: true,
        draggable: '>1',
        friction: 0.4,
        prevNextButtons: true,
        imagesLoaded: true
      })    ```

Everything else appears to working correctly. Any idea what might cause this bug?

My suspicion is that this behavior is caused by a button that is on the last flickity slide.
desandro commented 6 years ago

I'm sorry to see you're having trouble with Flickity. Could you provide a reduced test case? See Submitting Issues in the contributing guidelines.

nsallis commented 5 years ago

It looks like the issue was that there was a focus able button on the last slide. When I hit tab, it would jump to that slide because the element would gain focus. It's a nice feature to be able to jump to the slide with an element that is focused, but having an option to turn that off might be nice.