mirror of https://github.com/twbs/bootstrap.git
Dropdown: don't close menu on click inside input or textareas
This commit is contained in:
parent
7648848e04
commit
567d1043de
|
@ -436,7 +436,11 @@ EventHandler.on(document, EVENT_CLICK_DATA_API, Dropdown.clearMenus)
|
||||||
EventHandler.on(document, EVENT_KEYUP_DATA_API, Dropdown.clearMenus)
|
EventHandler.on(document, EVENT_KEYUP_DATA_API, Dropdown.clearMenus)
|
||||||
EventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
|
EventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
|
||||||
event.preventDefault()
|
event.preventDefault()
|
||||||
|
if (/input|textarea/i.test(event.target.tagName)) {
|
||||||
|
Dropdown.getOrCreateInstance(this).show()
|
||||||
|
} else {
|
||||||
Dropdown.getOrCreateInstance(this).toggle()
|
Dropdown.getOrCreateInstance(this).toggle()
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue