summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2016-06-10 17:04:54 +0100
committerPhil Hughes <me@iamphill.com>2016-06-10 17:04:54 +0100
commit638e318ee54b8d01773d545ff0de00dc7209d970 (patch)
treecbde6146fadc37f6c61cff1fcd1e94c6b09162d1
parentd6de816982eb9a227a384c3318d050a23ad18529 (diff)
downloadgitlab-ce-diff-scroll-point.tar.gz
Fixed issue when opening a highlighted line diffdiff-scroll-point
With the new project nav being fixed, the diff page is scrolling the highlighted under the nav meaning you cant see what is highlighted
-rw-r--r--app/assets/javascripts/merge_request_tabs.js.coffee2
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