Commit e27f5aef authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Fix sticky diff header

parent a9eba1bd
class @Diff
UNFOLD_COUNT = 20
constructor: ->
$(document).off('click', '.js-unfold')
$(document).on('click', '.js-unfold', (event) =>
target = $(event.target)
unfoldBottom = target.hasClass('js-unfold-bottom')
......@@ -36,7 +37,7 @@ class @Diff
)
)
$('.diff-header').stick_in_parent(offset_top: $('.navbar').height())
$('.diff-header').stick_in_parent(recalc_every: 1, offset_top: $('.navbar').height())
lineNumbers: (line) ->
return ([0, 0]) unless line.children().length
......
......@@ -95,6 +95,7 @@ class @MergeRequest
this.$('.merge-request-tabs .diffs-tab').addClass 'active'
this.loadDiff() unless @diffs_loaded
this.$('.diffs').show()
$(".diff-header").trigger("sticky_kit:recalc")
when 'commits'
this.$('.merge-request-tabs .commits-tab').addClass 'active'
this.$('.commits').show()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment