]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
tabs: make the `active` selector more restrictive again.
authorXhmikosR <xhmikosr@gmail.com>
Fri, 14 Jul 2017 14:49:30 +0000 (17:49 +0300)
committerXhmikosR <xhmikosr@gmail.com>
Fri, 11 Aug 2017 12:04:07 +0000 (15:04 +0300)
When one uses say a carousel inside a tab, the `.active` selector previously matches the carousel ones too leading to broken tabs.

It's not the perfect solution but should the job for now.

js/src/tab.js

index 1613bbb7debc22d5e83a5544be6ae05bfea18dd1..4fd69c50714d57f82b878f34505033934453e1aa 100644 (file)
@@ -44,7 +44,7 @@ const Tab = (($) => {
   const Selector = {
     DROPDOWN              : '.dropdown',
     NAV_LIST_GROUP        : '.nav, .list-group',
-    ACTIVE                : '.active',
+    ACTIVE                : '> .nav-item > .active, > .active',
     DATA_TOGGLE           : '[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',
     DROPDOWN_TOGGLE       : '.dropdown-toggle',
     DROPDOWN_ACTIVE_CHILD : '> .dropdown-menu .active'