From: Godric Date: Tue, 4 Dec 2012 00:21:07 +0000 (+0100) Subject: Update js/bootstrap-scrollspy.js X-Git-Tag: v2.2.2~9^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F6118%2Fhead;p=thirdparty%2Fbootstrap.git Update js/bootstrap-scrollspy.js Fix for Bootstrap issue #6013 "scrollSpy - offset calculation" https://github.com/twitter/bootstrap/issues/6013 --- diff --git a/js/bootstrap-scrollspy.js b/js/bootstrap-scrollspy.js index 3ffda2ebe7..ace6b87034 100644 --- a/js/bootstrap-scrollspy.js +++ b/js/bootstrap-scrollspy.js @@ -59,7 +59,7 @@ , $href = /^#\w/.test(href) && $(href) return ( $href && $href.length - && [[ $href.position().top, href ]] ) || null + && [[ $href.position().top + self.$scrollElement.scrollTop(), href ]] ) || null }) .sort(function (a, b) { return a[0] - b[0] }) .each(function () {