diff options
author | Phil Hughes <me@iamphill.com> | 2017-08-15 11:46:16 +0300 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2017-08-15 11:46:16 +0300 |
commit | 2f3eeb10814ef8c4f07cd25c9692524825d7681c (patch) | |
tree | 6b5daf0843a0c13276567ea6d1ccf74ae1e3ab77 /app/assets/javascripts/lib | |
parent | de0d0e4e47dffdab3f507ba93dcdff27da4d7421 (diff) |
Fixes sticky class being removed when over-scrolling in Safari
Closes #36457
Diffstat (limited to 'app/assets/javascripts/lib')
-rw-r--r-- | app/assets/javascripts/lib/utils/sticky.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/assets/javascripts/lib/utils/sticky.js b/app/assets/javascripts/lib/utils/sticky.js index 43a808b6ab3..ff2b66046b4 100644 --- a/app/assets/javascripts/lib/utils/sticky.js +++ b/app/assets/javascripts/lib/utils/sticky.js @@ -1,7 +1,7 @@ export const isSticky = (el, scrollY, stickyTop) => { const top = el.offsetTop - scrollY; - if (top === stickyTop) { + if (top <= stickyTop) { el.classList.add('is-stuck'); } else { el.classList.remove('is-stuck'); |