diff options
author | Jacob Schatz <jschatz@gitlab.com> | 2016-06-16 17:33:45 +0000 |
---|---|---|
committer | Jacob Schatz <jschatz@gitlab.com> | 2016-06-16 17:33:45 +0000 |
commit | 3e6f4a51f92ee8b76370e5316871193e553fd155 (patch) | |
tree | d2fd8bb41d6709cf1f8aaeeb59b031c981935b6b /app/assets/javascripts | |
parent | a44a5fd487321d91fa32bc57ac444c9072de7726 (diff) | |
parent | 638e318ee54b8d01773d545ff0de00dc7209d970 (diff) | |
download | gitlab-ce-3e6f4a51f92ee8b76370e5316871193e553fd155.tar.gz |
Merge branch 'diff-scroll-point' into 'master'
Fixed issue when opening a highlighted line diff
## What does this MR do?
With the new project nav being fixed, the diff page is scrolling the highlighted under the nav meaning you cant see what is highlighted. This corrects that by added the height of the new project nav into the offset.
See merge request !4597
Diffstat (limited to 'app/assets/javascripts')
-rw-r--r-- | app/assets/javascripts/merge_request_tabs.js.coffee | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/assets/javascripts/merge_request_tabs.js.coffee b/app/assets/javascripts/merge_request_tabs.js.coffee index 49a4727205a..894f80586f1 100644 --- a/app/assets/javascripts/merge_request_tabs.js.coffee +++ b/app/assets/javascripts/merge_request_tabs.js.coffee @@ -88,7 +88,7 @@ class @MergeRequestTabs scrollToElement: (container) -> if window.location.hash - navBarHeight = $('.navbar-gitlab').outerHeight() + navBarHeight = $('.navbar-gitlab').outerHeight() + $('.layout-nav').outerHeight() $el = $("#{container} #{window.location.hash}:not(.match)") $.scrollTo("#{container} #{window.location.hash}:not(.match)", offset: -navBarHeight) if $el.length |