mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-15 01:55:46 +02: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:
@@ -258,7 +258,7 @@ const ScrollSpy = (($) => {
|
|||||||
} else {
|
} else {
|
||||||
// todo (fat) this is kinda sus...
|
// todo (fat) this is kinda sus...
|
||||||
// recursively add actives to tested nav-links
|
// 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, {
|
$(this._scrollElement).trigger(Event.ACTIVATE, {
|
||||||
|
Reference in New Issue
Block a user