Skip to content
Snippets Groups Projects
Commit 68b15af4 authored by Robert Speicher's avatar Robert Speicher
Browse files

Fix IssuableContext javascript

We were calling `affix` before the events were bound so they never
triggered correctly.

Closes #2597
parent dfa32123
No related branches found
No related tags found
1 merge request!1356Fix IssuableContext javascript
Pipeline #
Loading
Loading
@@ -11,12 +11,13 @@ class @IssuableContext
$(this).submit()
 
$('.issuable-details').waitForImages ->
$('.issuable-affix').on 'affix.bs.affix', ->
$(@).width($(@).outerWidth())
.on 'affixed-top.bs.affix affixed-bottom.bs.affix', ->
$(@).width('')
$('.issuable-affix').affix offset:
top: ->
@top = ($('.issuable-affix').offset().top - 70)
bottom: ->
@bottom = $('.footer').outerHeight(true)
$('.issuable-affix').on 'affix.bs.affix', ->
$(@).width($(@).outerWidth())
.on 'affixed-top.bs.affix affixed-bottom.bs.affix', ->
$(@).width('')
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment