diff options
author | Jacob Schatz <jschatz@gitlab.com> | 2016-06-16 20:33:45 +0300 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2016-06-17 01:14:39 +0300 |
commit | e405811d4f8a90c812487409f00c124516de6a17 (patch) | |
tree | e9b61ba064736286c1c86dca3bbe502d7f566290 /app/assets | |
parent | 80fc11ac8c31d68d5c50199dd8c87230c38e4738 (diff) |
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')
-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 |