aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob <[email protected]>2014-03-13 21:45:04 -0700
committerJacob <[email protected]>2014-03-13 21:45:04 -0700
commit905c78129f93ceef943332e73678ea45c08ea190 (patch)
tree252c5711ea6ca829d3d272897e7e82f06ac89c4f
parent8c9739d4773c268b114296d90e61b5f4e2932517 (diff)
parent1ceab8b89fede53d7b62b80b456c058703de9a6c (diff)
downloadbootstrap-905c78129f93ceef943332e73678ea45c08ea190.tar.xz
bootstrap-905c78129f93ceef943332e73678ea45c08ea190.zip
Merge pull request #11937 from IHomer/master
Fix: IE10 or lower incorrectly determines the scrollheight of the body. ...
-rw-r--r--js/scrollspy.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/js/scrollspy.js b/js/scrollspy.js
index 4346c865c..fc907f11b 100644
--- a/js/scrollspy.js
+++ b/js/scrollspy.js
@@ -64,7 +64,7 @@
ScrollSpy.prototype.process = function () {
var scrollTop = this.$scrollElement.scrollTop() + this.options.offset
- var scrollHeight = this.$scrollElement[0].scrollHeight || this.$body[0].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