Merge branch 'mr-sticky-tabs-perf-bar' into 'master'
Fixes merge request bar styling when performance bar is visible See merge request gitlab-org/gitlab-ce!17778
This commit is contained in:
commit
79aa003210
1 changed files with 5 additions and 0 deletions
|
@ -73,6 +73,7 @@ export default class MergeRequestTabs {
|
||||||
constructor({ action, setUrl, stubLocation } = {}) {
|
constructor({ action, setUrl, stubLocation } = {}) {
|
||||||
const mergeRequestTabs = document.querySelector('.js-tabs-affix');
|
const mergeRequestTabs = document.querySelector('.js-tabs-affix');
|
||||||
const navbar = document.querySelector('.navbar-gitlab');
|
const navbar = document.querySelector('.navbar-gitlab');
|
||||||
|
const peek = document.getElementById('peek');
|
||||||
const paddingTop = 16;
|
const paddingTop = 16;
|
||||||
|
|
||||||
this.diffsLoaded = false;
|
this.diffsLoaded = false;
|
||||||
|
@ -86,6 +87,10 @@ export default class MergeRequestTabs {
|
||||||
this.showTab = this.showTab.bind(this);
|
this.showTab = this.showTab.bind(this);
|
||||||
this.stickyTop = navbar ? navbar.offsetHeight - paddingTop : 0;
|
this.stickyTop = navbar ? navbar.offsetHeight - paddingTop : 0;
|
||||||
|
|
||||||
|
if (peek) {
|
||||||
|
this.stickyTop += peek.offsetHeight;
|
||||||
|
}
|
||||||
|
|
||||||
if (mergeRequestTabs) {
|
if (mergeRequestTabs) {
|
||||||
this.stickyTop += mergeRequestTabs.offsetHeight;
|
this.stickyTop += mergeRequestTabs.offsetHeight;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue