diff --git a/js/affix.js b/js/affix.js index deea29485f..04f389e2c5 100644 --- a/js/affix.js +++ b/js/affix.js @@ -53,7 +53,7 @@ var colliderTop = initializing ? scrollTop : position.top var colliderHeight = initializing ? targetHeight : height - if (offsetTop != null && colliderTop <= offsetTop) return 'top' + if (offsetTop != null && scrollTop <= offsetTop) return 'top' if (offsetBottom != null && (colliderTop + colliderHeight >= scrollHeight - offsetBottom)) return 'bottom' return false