Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
f67369fb
Commit
f67369fb
authored
May 30, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
621f77af
c7e5d046
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
0 deletions
+15
-0
app/assets/javascripts/lib/utils/common_utils.js
app/assets/javascripts/lib/utils/common_utils.js
+10
-0
changelogs/unreleased/47846-position-is-off-when-visiting-files-with-anchors.yml
...7846-position-is-off-when-visiting-files-with-anchors.yml
+5
-0
No files found.
app/assets/javascripts/lib/utils/common_utils.js
View file @
f67369fb
...
...
@@ -94,6 +94,8 @@ export const handleLocationHash = () => {
const
fixedNav
=
document
.
querySelector
(
'
.navbar-gitlab
'
);
const
performanceBar
=
document
.
querySelector
(
'
#js-peek
'
);
const
topPadding
=
8
;
const
diffFileHeader
=
document
.
querySelector
(
'
.js-file-title
'
);
const
versionMenusContainer
=
document
.
querySelector
(
'
.mr-version-menus-container
'
);
let
adjustment
=
0
;
if
(
fixedNav
)
adjustment
-=
fixedNav
.
offsetHeight
;
...
...
@@ -114,6 +116,14 @@ export const handleLocationHash = () => {
adjustment
-=
performanceBar
.
offsetHeight
;
}
if
(
diffFileHeader
)
{
adjustment
-=
diffFileHeader
.
offsetHeight
;
}
if
(
versionMenusContainer
)
{
adjustment
-=
versionMenusContainer
.
offsetHeight
;
}
if
(
isInMRPage
())
{
adjustment
-=
topPadding
;
}
...
...
changelogs/unreleased/47846-position-is-off-when-visiting-files-with-anchors.yml
0 → 100644
View file @
f67369fb
---
title
:
Resolve Position is off when visiting files with anchors
merge_request
:
28913
author
:
type
:
fixed
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