mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-08 06:36:33 +02:00
Dropdown: support .dropdown-item
wrapped in <li>
tags (#33634)
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
This commit is contained in:
@@ -161,7 +161,12 @@ class Tab extends BaseComponent {
|
||||
element.classList.add(CLASS_NAME_SHOW)
|
||||
}
|
||||
|
||||
if (element.parentNode && element.parentNode.classList.contains(CLASS_NAME_DROPDOWN_MENU)) {
|
||||
let parent = element.parentNode
|
||||
if (parent && parent.nodeName === 'LI') {
|
||||
parent = parent.parentNode
|
||||
}
|
||||
|
||||
if (parent && parent.classList.contains(CLASS_NAME_DROPDOWN_MENU)) {
|
||||
const dropdownElement = element.closest(SELECTOR_DROPDOWN)
|
||||
|
||||
if (dropdownElement) {
|
||||
|
Reference in New Issue
Block a user