Use e.target instead :focus selector.
This commit is contained in:
parent
ccecb7cde4
commit
bd66b12a94
1 changed files with 1 additions and 1 deletions
|
|
@ -77,7 +77,7 @@
|
|||
|
||||
if (!$items.length) return
|
||||
|
||||
var index = $items.index($items.filter(':focus'))
|
||||
var index = $items.index(e.target)
|
||||
|
||||
if (e.keyCode == 38 && index > 0) index-- // up
|
||||
if (e.keyCode == 40 && index < $items.length - 1) index++ // down
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue