diff options
author | Phil Hughes <me@iamphill.com> | 2018-03-15 17:23:33 +0000 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2018-03-15 17:23:45 +0000 |
commit | 306f5f07b114eb7c1df02d4bd62a1adc12b29f8b (patch) | |
tree | 7767cfbc1c60b701f9925fa432342883531b4d12 /app/assets/javascripts | |
parent | 3e20b83b8b3145abd4e3f09848111d427032d309 (diff) | |
download | gitlab-ce-306f5f07b114eb7c1df02d4bd62a1adc12b29f8b.tar.gz |
Fixes merge request bar styling when performance bar is visiblemr-sticky-tabs-perf-bar
Diffstat (limited to 'app/assets/javascripts')
-rw-r--r-- | app/assets/javascripts/merge_request_tabs.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/assets/javascripts/merge_request_tabs.js b/app/assets/javascripts/merge_request_tabs.js index f01aef45500..e77318fef46 100644 --- a/app/assets/javascripts/merge_request_tabs.js +++ b/app/assets/javascripts/merge_request_tabs.js @@ -73,6 +73,7 @@ export default class MergeRequestTabs { constructor({ action, setUrl, stubLocation } = {}) { const mergeRequestTabs = document.querySelector('.js-tabs-affix'); const navbar = document.querySelector('.navbar-gitlab'); + const peek = document.getElementById('peek'); const paddingTop = 16; this.diffsLoaded = false; @@ -86,6 +87,10 @@ export default class MergeRequestTabs { this.showTab = this.showTab.bind(this); this.stickyTop = navbar ? navbar.offsetHeight - paddingTop : 0; + if (peek) { + this.stickyTop += peek.offsetHeight; + } + if (mergeRequestTabs) { this.stickyTop += mergeRequestTabs.offsetHeight; } |