mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-16 18:44:01 +02:00
Adding autocycling
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user