summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/job.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/job.js')
-rw-r--r--app/assets/javascripts/job.js11
1 files changed, 9 insertions, 2 deletions
diff --git a/app/assets/javascripts/job.js b/app/assets/javascripts/job.js
index fc13f467675..e76bae08699 100644
--- a/app/assets/javascripts/job.js
+++ b/app/assets/javascripts/job.js
@@ -1,6 +1,6 @@
import $ from 'jquery';
import _ from 'underscore';
-import { polyfillSticky } from './lib/utils/sticky';
+import StickyFill from 'stickyfilljs';
import axios from './lib/utils/axios_utils';
import { visitUrl } from './lib/utils/url_utility';
import bp from './breakpoints';
@@ -70,7 +70,14 @@ export default class Job extends LogOutputBehaviours {
}
initAffixTopArea() {
- polyfillSticky(this.$topBar);
+ /**
+ 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);
}
scrollToBottom() {