question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Arrow key navigation not working

See original GitHub issue

Autoplay working well, but draggable and accessibility aren’t working. The slides can’t be dragged or moved with the right/left arrow keys.

$(document).ready(function(){
    $('.slider').slick({
      dots: true,
      focusOnSelect: true,
      autoplay: true,
      draggable: true,
      autoplaySpeed: 6000,
      infinite: true,
      pauseOnHover: false,
      swipeToSlide: true,
      arrows: false,
      accessibility: true,
    });
});

Thank you.

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:21 (4 by maintainers)

github_iconTop GitHub Comments

42reactions
Tantaculacommented, Oct 17, 2016

@gitsaagar Yes, .focus() will not work on divs and lists. Looks like the only solution is use key events

var $carousel = $('.stest');
$(document).on('keydown', function(e) {
                if(e.keyCode == 37) {
                    $carousel.slick('slickPrev');
                }
                if(e.keyCode == 39) {
                    $carousel.slick('slickNext');
                }
            });
12reactions
davegreenwpcommented, Feb 7, 2017

This got it to work in the end $(document).find('.slick-list').attr('tabindex', 0).focus();

Read more comments on GitHub >

github_iconTop Results From Across the Web

Arrow keys are not working in Windows 11/10 laptop keyboard
Fix Arrow keys are not working in Windows 11/10 · 1] Verify the keyboard · 2] Re-install the keyboard driver · 3] Run...
Read more >
Arrow Keys Not Working in Excel? 5 Ways to Troubleshoot
1. Click Start and type "on screen keyboard." · 2. When you see On-Screen Keyboard appear in search results, click it. The on-screen...
Read more >
How to Fix Arrow Keys if they Stopped Working: 5 Unexpected ...
There are a few things that could cause arrow keys to stop working. These include a faulty driver, a jammed key, the cursor...
Read more >
3 Ways to Fix the Arrow Keys Not Working in Excel - MakeUseOf
1. Turn Off Scroll Lock ... You won't be able to use the arrow keys if you have a scroll lock enabled on...
Read more >
Arrow key navigation does not work in action menu with ...
Caused by DE62719. JAWS provides arrow key navigation through which the virtual cursor moves without disturbing the actual keyboard focus.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found