mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-11 16:14:04 +02:00
When we show our tabs element use children to be more restrictive
This commit is contained in:
@@ -44,7 +44,7 @@ const Tab = (($) => {
|
|||||||
const Selector = {
|
const Selector = {
|
||||||
DROPDOWN : '.dropdown',
|
DROPDOWN : '.dropdown',
|
||||||
NAV_LIST_GROUP : '.nav, .list-group',
|
NAV_LIST_GROUP : '.nav, .list-group',
|
||||||
ACTIVE : '> .nav-item > .active, > .active',
|
ACTIVE : '.active',
|
||||||
DATA_TOGGLE : '[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',
|
DATA_TOGGLE : '[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',
|
||||||
DROPDOWN_TOGGLE : '.dropdown-toggle',
|
DROPDOWN_TOGGLE : '.dropdown-toggle',
|
||||||
DROPDOWN_ACTIVE_CHILD : '> .dropdown-menu .active'
|
DROPDOWN_ACTIVE_CHILD : '> .dropdown-menu .active'
|
||||||
@@ -148,7 +148,8 @@ const Tab = (($) => {
|
|||||||
// private
|
// private
|
||||||
|
|
||||||
_activate(element, container, callback) {
|
_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
|
const isTransitioning = callback
|
||||||
&& Util.supportsTransitionEnd()
|
&& Util.supportsTransitionEnd()
|
||||||
&& (active && $(active).hasClass(ClassName.FADE))
|
&& (active && $(active).hasClass(ClassName.FADE))
|
||||||
|
Reference in New Issue
Block a user