diff options
author | Tim Zallmann <tzallmann@gitlab.com> | 2017-08-16 15:28:31 +0300 |
---|---|---|
committer | Tim Zallmann <tzallmann@gitlab.com> | 2017-08-16 15:28:31 +0300 |
commit | 1998a4a10796a277b3e587e61a8299ce981c92d2 (patch) | |
tree | ddc168e4eba4803effe2d57b8dcb0d3368a3a23e | |
parent | f8556d02ead3e2845317b1e9aae804938681a5f5 (diff) | |
parent | 2f3eeb10814ef8c4f07cd25c9692524825d7681c (diff) |
Merge branch 'safari-overscroll-sticky-fix' into 'master'
Fixes sticky class being removed when over-scrolling in Safari
Closes #36457
See merge request !13556
-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'); |