We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 8c9739d + 1ceab8b commit 905c781Copy full SHA for 905c781
js/scrollspy.js
@@ -64,7 +64,7 @@
64
65
ScrollSpy.prototype.process = function () {
66
var scrollTop = this.$scrollElement.scrollTop() + this.options.offset
67
- 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)
68
var maxScroll = scrollHeight - this.$scrollElement.height()
69
var offsets = this.offsets
70
var targets = this.targets
0 commit comments