From 1ceab8b89fede53d7b62b80b456c058703de9a6c Mon Sep 17 00:00:00 2001 From: "joep.joosten@ihomer.nl" Date: Thu, 19 Dec 2013 12:41:33 +0100 Subject: [PATCH] Fix: IE10 or lower incorrectly determines the scrollheight of the body. Use document.documentElement for IE. To make this browser agnostic, the maximum scrollheight of both body and documentElement is used. --- js/scrollspy.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/scrollspy.js b/js/scrollspy.js index d2c9c8d4d6..f1fc8f27f7 100644 --- a/js/scrollspy.js +++ b/js/scrollspy.js @@ -62,7 +62,7 @@ ScrollSpy.prototype.process = function () { var scrollTop = this.$scrollElement.scrollTop() + this.options.offset - var scrollHeight = this.$scrollElement[0].scrollHeight || Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight) + var scrollHeight = this.$scrollElement[0].scrollHeight || Math.max(this.$body[0].scrollHeight, document.documentElement.scrollHeight) var maxScroll = scrollHeight - this.$scrollElement.height() var offsets = this.offsets var targets = this.targets