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
diff options
context:
space:
mode:
authorJohann-S <johann.servoire@gmail.com>2017-07-16 17:04:37 +0300
committerXhmikosR <xhmikosr@gmail.com>2017-08-11 15:04:07 +0300
commit640c13062ce80b0b94aef9444050d4d3820fb2d8 (patch)
tree9ecc3981e8dd8636d74251ebf0e32c2ed0d6f22b /js/src/tab.js
parentb55fa5579b409be76f551cbb3c1e46e1ad71bdfd (diff)
When we show our tabs element use children to be more restrictive
Diffstat (limited to 'js/src/tab.js')
-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 4fd69c5071..5e5a83118d 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))