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