summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Zallmann <tzallmann@gitlab.com>2017-08-16 12:28:31 +0000
committerTim Zallmann <tzallmann@gitlab.com>2017-08-16 12:28:31 +0000
commit1998a4a10796a277b3e587e61a8299ce981c92d2 (patch)
treeddc168e4eba4803effe2d57b8dcb0d3368a3a23e
parentf8556d02ead3e2845317b1e9aae804938681a5f5 (diff)
parent2f3eeb10814ef8c4f07cd25c9692524825d7681c (diff)
downloadgitlab-ce-1998a4a10796a277b3e587e61a8299ce981c92d2.tar.gz
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.js2
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');