]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Use document scroll height instead of offset height to support body with absolute... 11722/head
authorLukáš Doležal <lu.dolezal@gmail.com>
Thu, 5 Dec 2013 15:28:31 +0000 (16:28 +0100)
committerLukáš Doležal <lu.dolezal@gmail.com>
Thu, 5 Dec 2013 15:28:31 +0000 (16:28 +0100)
js/affix.js

index 552bffa3fed8ec926a6dfc1e2b50269bdd91780d..e025e205623fb335367e871b4e92a17f1e620e94 100644 (file)
@@ -73,7 +73,7 @@
     this.$element.removeClass(Affix.RESET).addClass('affix' + (affix ? '-' + affix : ''))
 
     if (affix == 'bottom') {
-      this.$element.offset({ top: document.body.offsetHeight - offsetBottom - this.$element.height() })
+      this.$element.offset({ top: scrollHeight - offsetBottom - this.$element.height() })
     }
   }