mirror of
https://github.com/twbs/bootstrap.git
synced 2025-04-12 04:02:26 +02:00
Adding autocycling
This commit is contained in:
parent
787dfea8a2
commit
4fa3c39cfa
@ -331,9 +331,8 @@ class Dropdown extends BaseComponent {
|
||||
return
|
||||
}
|
||||
|
||||
// if target isn't included in items (e.g. when expanding the dropdown)
|
||||
// allow cycling to get the last item in case key equals ARROW_UP_KEY
|
||||
getNextActiveElement(items, target, key === ARROW_DOWN_KEY, !items.includes(target)).focus()
|
||||
// Allow cycling with up and down arrows
|
||||
getNextActiveElement(items, target, key === ARROW_DOWN_KEY, true).focus()
|
||||
}
|
||||
|
||||
// Static
|
||||
|
Loading…
x
Reference in New Issue
Block a user