Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/js/src
diff options
context:
space:
mode:
authorJohann-S <johann.servoire@gmail.com>2019-02-06 13:12:02 +0300
committerGitHub <noreply@github.com>2019-02-06 13:12:02 +0300
commit11880109fcafa07b4171c3e30e28fb98b3e21480 (patch)
treec7e749be33390f203ce58b8d207f37eb68efa55b /js/src
parent8217499640190e8eb72aa7214525faec3238b04a (diff)
fix tabs, apply show class only when fade class is present (#28183)
Diffstat (limited to 'js/src')
-rw-r--r--js/src/tab.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/js/src/tab.js b/js/src/tab.js
index 64b66d8610..e49ac4b8c3 100644
--- a/js/src/tab.js
+++ b/js/src/tab.js
@@ -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]