Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
heptapod
heptapod
Commits
f067326d22f3
Commit
969ee912
authored
Mar 15, 2018
by
Phil Hughes
Browse files
Fixes merge request bar styling when performance bar is visible
parent
24e6dcb691c5
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/assets/javascripts/merge_request_tabs.js
View file @
f067326d
...
@@ -73,6 +73,7 @@ export default class MergeRequestTabs {
...
@@ -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 {
...
@@ -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
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment