summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/job.js
diff options
context:
space:
mode:
authorClement Ho <clemmakesapps@gmail.com>2018-06-01 16:41:50 +0000
committerClement Ho <clemmakesapps@gmail.com>2018-06-01 16:41:50 +0000
commit30bc82f68b6de69a2e456286888824fa0221d4a7 (patch)
tree32597a02aa74ed80a3370c3f08dda12d152c5b68 /app/assets/javascripts/job.js
parentabe98d44e8902a3f721c0f17cc20dc55bcb2d2f6 (diff)
downloadgitlab-ce-30bc82f68b6de69a2e456286888824fa0221d4a7.tar.gz
Revert "Merge branch '46833-sticky-polyfill' into 'master'"
This reverts merge request !19304
Diffstat (limited to 'app/assets/javascripts/job.js')
-rw-r--r--app/assets/javascripts/job.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/app/assets/javascripts/job.js b/app/assets/javascripts/job.js
index 8dfe8aae5b5..611e8200b4d 100644
--- a/app/assets/javascripts/job.js
+++ b/app/assets/javascripts/job.js
@@ -80,6 +80,13 @@ export default class Job {
}
initAffixTopArea() {
+ /**
+ If the browser does not support position sticky, it returns the position as static.
+ If the browser does support sticky, then we allow the browser to handle it, if not
+ then we use a polyfill
+ */
+ if (this.$topBar.css('position') !== 'static') return;
+
StickyFill.add(this.$topBar);
}