From: Johann-S Date: Sun, 16 Jul 2017 14:04:37 +0000 (+0200) Subject: When we show our tabs element use children to be more restrictive X-Git-Tag: v4.0.0-beta.2~403^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=640c13062ce80b0b94aef9444050d4d3820fb2d8;p=thirdparty%2Fbootstrap.git When we show our tabs element use children to be more restrictive --- 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))