Commit 79aa0032 authored by Filipa Lacerda's avatar Filipa Lacerda 🤸🏼

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
parents a63d7470 306f5f07
Pipeline #19011826 passed with stages
in 30 minutes
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment