1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-11 08:04:59 +02:00

fix tabs, apply show class only when fade class is present (#28183)

This commit is contained in:
Johann-S
2019-02-06 11:12:02 +01:00
committed by GitHub
parent 8217499640
commit 11880109fc
2 changed files with 60 additions and 1 deletions

View File

@@ -188,7 +188,10 @@ class Tab {
}
Util.reflow(element)
$(element).addClass(ClassName.SHOW)
if (element.classList.contains(ClassName.FADE)) {
element.classList.add(ClassName.SHOW)
}
if (element.parentNode && $(element.parentNode).hasClass(ClassName.DROPDOWN_MENU)) {
const dropdownElement = $(element).closest(Selector.DROPDOWN)[0]