1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-09 07:06:36 +02:00

Fix v5 regressions in tab dropdown functionality (#33626)

Scope selector to `dropdownElement` when adding active classes
This commit is contained in:
Carson Sievert
2021-04-15 05:53:55 -05:00
committed by GitHub
parent f61a0218b3
commit 69f5c0130b
2 changed files with 36 additions and 1 deletions

View File

@@ -166,7 +166,7 @@ class Tab extends BaseComponent {
const dropdownElement = element.closest(SELECTOR_DROPDOWN)
if (dropdownElement) {
SelectorEngine.find(SELECTOR_DROPDOWN_TOGGLE)
SelectorEngine.find(SELECTOR_DROPDOWN_TOGGLE, dropdownElement)
.forEach(dropdown => dropdown.classList.add(CLASS_NAME_ACTIVE))
}