twbs/bootstrap — pull request #13220 by pconerly (2014-03-28 23:45:59+00:00)
Title: Scrollspy generates wrong offsets for a page-- recalculate offsets if `scrollheight` changes.

I have a long landing page that has a lot of images, and occasionally the images load after scrollspy's offset has been generated. The result is that the offset array generated is wrong and it will highlight the wrong images.

Looking at the code in `scrollspy.js`, there is no detection for a change in document height.

So here's the fix!