Commit 9f30f557 authored by moodyroto's avatar moodyroto
Browse files

Update scrollspy.js

Scrollspy target in tab content does not work properly. Calling .parents('.active') will return all parents with an active class (including the tab pane). Changing this line to .parentsUntil(this.options.target, '.active') should resolve the issue. This will scope the query to only search for active elements inside the scrollspy target.
parent e7d6af00
4 merge requests!28721Hot test,!22103test,!11453fix scrollspy for targets within tabs,!25326Adjust examples
Showing with 1 addition and 1 deletion
+1 -1
...@@ -96,7 +96,7 @@ ...@@ -96,7 +96,7 @@
this.activeTarget = target this.activeTarget = target
$(this.selector) $(this.selector)
.parents('.active') .parentsUntil(this.options.target, '.active')
.removeClass('active') .removeClass('active')
var selector = this.selector var selector = this.selector
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment