twitter/bootstrap — pull request #3829 by P2000 (2012-06-13 13:38:24+00:00)
Title: bootstrap-scrollspy.js: enable work around for body { height: 100%; }

I might have missed some other easy way to fix this but this works, after hours of tracking it down.

In case you define

html, body {height: 100%;}

in your css, as suggeted on
http://www.cssstickyfooter.com/using-sticky-footer-code.html

which is working fine otherwise, scrollspy breaks.

This patch enables you to work around that issue by calling
scrollspy like this:

$(window).scrollspy({wrap: $('#wrap')[0]});