Rachid O
Rachid O

Reputation: 14052

How to scroll a bootstrap modal with arrow keys up - down

I tried this:

// this = modal
$(this).focus(); 

I tried tha above one as well as tried to trigger a click event on it but didn't work!

EDIT

This is the website i'm working on : "website", you can launch the modal and see that it does not scroll with arrow keys.

But if you click on the modal it becomes scrollable, and that's why I tried to trigger the click event with jquery

Upvotes: 0

Views: 2474

Answers (1)

Mivaweb
Mivaweb

Reputation: 5732

Try adding the focus on the first a hyperlink element and see what that does:

$('.modal a:first-child').focus();

Upvotes: 1

Related Questions