From 8b959cacbc26666c13fd0e893a3f563ac4f9d09e Mon Sep 17 00:00:00 2001
From: Godric <godric@0x3f.fr>
Date: Tue, 4 Dec 2012 01:21:07 +0100
Subject: [PATCH] Update js/bootstrap-scrollspy.js
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Fix for Bootstrap issueƂ #6013 "scrollSpy - offset calculation"
https://github.com/twitter/bootstrap/issues/6013
---
 js/bootstrap-scrollspy.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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 () {
-- 
GitLab