mirror of
https://github.com/twbs/bootstrap.git
synced 2025-02-20 17:54:23 +01:00
Add guard rail to dropdown keyhandler
This commit is contained in:
parent
c735b2e196
commit
cedd335da8
@ -416,6 +416,10 @@ class Dropdown extends BaseComponent {
|
||||
SelectorEngine.next(this, SELECTOR_DATA_TOGGLE)[0] ||
|
||||
SelectorEngine.findOne(SELECTOR_DATA_TOGGLE, event.delegateTarget.parentNode))
|
||||
|
||||
if (getToggleButton === null) {
|
||||
return
|
||||
}
|
||||
|
||||
const instance = Dropdown.getOrCreateInstance(getToggleButton)
|
||||
|
||||
if (isUpOrDownEvent) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user