Skip to content

Commit 905c781

Browse files
committed
Merge pull request twbs#11937 from IHomer/master
Fix: IE10 or lower incorrectly determines the scrollheight of the body. ...
2 parents 8c9739d + 1ceab8b commit 905c781

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

js/scrollspy.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464

6565
ScrollSpy.prototype.process = function () {
6666
var scrollTop = this.$scrollElement.scrollTop() + this.options.offset
67-
var scrollHeight = this.$scrollElement[0].scrollHeight || this.$body[0].scrollHeight
67+
var scrollHeight = this.$scrollElement[0].scrollHeight || Math.max(this.$body[0].scrollHeight, document.documentElement.scrollHeight)
6868
var maxScroll = scrollHeight - this.$scrollElement.height()
6969
var offsets = this.offsets
7070
var targets = this.targets

0 commit comments

Comments
 (0)