diff options
| author | mr-july <[email protected]> | 2016-12-23 07:00:56 +0100 |
|---|---|---|
| committer | Mark Otto <[email protected]> | 2016-12-22 22:00:56 -0800 |
| commit | 1d6cdb65b32f918fc497953adf02b60e26ea3fec (patch) | |
| tree | 9a85211439c43e9c925dd054bd272410e6653648 | |
| parent | 69935953413ca0bd96f2d70fe3b6f905ae2141b0 (diff) | |
| download | bootstrap-1d6cdb65b32f918fc497953adf02b60e26ea3fec.tar.xz bootstrap-1d6cdb65b32f918fc497953adf02b60e26ea3fec.zip | |
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
| -rw-r--r-- | js/src/scrollspy.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/js/src/scrollspy.js b/js/src/scrollspy.js index 9cb1438ca..0a4708bf9 100644 --- a/js/src/scrollspy.js +++ b/js/src/scrollspy.js @@ -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, { |
