From 9f30f557213f1e8f821414473550639f5f93f29a Mon Sep 17 00:00:00 2001 From: moodyroto Date: Mon, 11 Nov 2013 12:21:34 -0500 Subject: [PATCH] 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. --- js/scrollspy.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/scrollspy.js b/js/scrollspy.js index 1d2fc78595..295c2e0758 100644 --- a/js/scrollspy.js +++ b/js/scrollspy.js @@ -96,7 +96,7 @@ this.activeTarget = target $(this.selector) - .parents('.active') + .parentsUntil(this.options.target, '.active') .removeClass('active') var selector = this.selector