Skip to content
Snippets Groups Projects
Commit 638e318e authored by Phil Hughes's avatar Phil Hughes
Browse files

Fixed issue when opening a highlighted line diff

With the new project nav being fixed, the diff page is scrolling the highlighted under the nav meaning you cant see what is highlighted
parent d6de8169
No related branches found
No related tags found
1 merge request!4597Fixed issue when opening a highlighted line diff
Pipeline #
Loading
@@ -88,7 +88,7 @@ class @MergeRequestTabs
Loading
@@ -88,7 +88,7 @@ class @MergeRequestTabs
   
scrollToElement: (container) -> scrollToElement: (container) ->
if window.location.hash if window.location.hash
navBarHeight = $('.navbar-gitlab').outerHeight() navBarHeight = $('.navbar-gitlab').outerHeight() + $('.layout-nav').outerHeight()
   
$el = $("#{container} #{window.location.hash}:not(.match)") $el = $("#{container} #{window.location.hash}:not(.match)")
$.scrollTo("#{container} #{window.location.hash}:not(.match)", offset: -navBarHeight) if $el.length $.scrollTo("#{container} #{window.location.hash}:not(.match)", offset: -navBarHeight) if $el.length
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment