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