0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-12-01 13:24:25 +01:00

scrollspy: fix wrong activation of all nested links (#20304)

* fix wrong activation of all nested links;
just first level item should be activated

* use template instead of string concatenation
This commit is contained in:
mr-july 2016-12-23 07:00:56 +01:00 committed by Mark Otto
parent 6993595341
commit 1d6cdb65b3

View File

@ -258,7 +258,7 @@ const ScrollSpy = (($) => {
} else {
// todo (fat) this is kinda sus...
// recursively add actives to tested nav-links
$link.parents(Selector.LI).find(Selector.NAV_LINKS).addClass(ClassName.ACTIVE)
$link.parents(Selector.LI).find(`> ${Selector.NAV_LINKS}`).addClass(ClassName.ACTIVE)
}
$(this._scrollElement).trigger(Event.ACTIVATE, {