aboutsummaryrefslogtreecommitdiff
path: root/js/src
diff options
context:
space:
mode:
authorJohann-S <[email protected]>2017-07-16 16:04:37 +0200
committerXhmikosR <[email protected]>2017-08-11 15:04:07 +0300
commit640c13062ce80b0b94aef9444050d4d3820fb2d8 (patch)
tree9ecc3981e8dd8636d74251ebf0e32c2ed0d6f22b /js/src
parentb55fa5579b409be76f551cbb3c1e46e1ad71bdfd (diff)
downloadbootstrap-640c13062ce80b0b94aef9444050d4d3820fb2d8.tar.xz
bootstrap-640c13062ce80b0b94aef9444050d4d3820fb2d8.zip
When we show our tabs element use children to be more restrictive
Diffstat (limited to 'js/src')
-rw-r--r--js/src/tab.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/js/src/tab.js b/js/src/tab.js
index 4fd69c507..5e5a83118 100644
--- a/js/src/tab.js
+++ b/js/src/tab.js
@@ -44,7 +44,7 @@ const Tab = (($) => {
const Selector = {
DROPDOWN : '.dropdown',
NAV_LIST_GROUP : '.nav, .list-group',
- ACTIVE : '> .nav-item > .active, > .active',
+ ACTIVE : '.active',
DATA_TOGGLE : '[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',
DROPDOWN_TOGGLE : '.dropdown-toggle',
DROPDOWN_ACTIVE_CHILD : '> .dropdown-menu .active'
@@ -148,7 +148,8 @@ const Tab = (($) => {
// private
_activate(element, container, callback) {
- const active = $(container).find(Selector.ACTIVE)[0]
+ const activeElements = callback ? $(container).children(Selector.ACTIVE) : $(container).find(Selector.ACTIVE)
+ const active = activeElements[0]
const isTransitioning = callback
&& Util.supportsTransitionEnd()
&& (active && $(active).hasClass(ClassName.FADE))