mirror of
https://github.com/twbs/bootstrap.git
synced 2025-02-06 04:08:22 +01:00
Use document scroll height instead of offset height to support body with absolute height
This commit is contained in:
parent
aac4f0189e
commit
6e9efb2024
@ -73,7 +73,7 @@
|
|||||||
this.$element.removeClass(Affix.RESET).addClass('affix' + (affix ? '-' + affix : ''))
|
this.$element.removeClass(Affix.RESET).addClass('affix' + (affix ? '-' + affix : ''))
|
||||||
|
|
||||||
if (affix == 'bottom') {
|
if (affix == 'bottom') {
|
||||||
this.$element.offset({ top: document.body.offsetHeight - offsetBottom - this.$element.height() })
|
this.$element.offset({ top: scrollHeight - offsetBottom - this.$element.height() })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user