diff options
| author | [email protected] <[email protected]> | 2013-12-19 12:18:51 +0100 |
|---|---|---|
| committer | [email protected] <[email protected]> | 2013-12-19 12:18:51 +0100 |
| commit | 3bcb1cc255b2c06dff093c7d7fb9f70505629eec (patch) | |
| tree | 500e33227c26ef6879180bf24adeaa308c4a5df5 /js | |
| parent | fb8310fbc6d413a3446ecf1772a77911d45fbd62 (diff) | |
| download | bootstrap-3bcb1cc255b2c06dff093c7d7fb9f70505629eec.tar.xz bootstrap-3bcb1cc255b2c06dff093c7d7fb9f70505629eec.zip | |
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.
Diffstat (limited to 'js')
| -rw-r--r-- | js/scrollspy.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/js/scrollspy.js b/js/scrollspy.js index b41c27413..d2c9c8d4d 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 || 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 |
