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
This commit is contained in:
commit
3e6f4a51f9
1 changed files with 1 additions and 1 deletions
|
@ -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…
Reference in a new issue