Commit 46b56fc7 authored by Jacob Schatz's avatar Jacob Schatz

initial fix

parent 12023557
...@@ -15,7 +15,16 @@ class @IssuableContext ...@@ -15,7 +15,16 @@ class @IssuableContext
$(@).width($(@).outerWidth()) $(@).width($(@).outerWidth())
.on 'affixed-top.bs.affix affixed-bottom.bs.affix', -> .on 'affixed-top.bs.affix affixed-bottom.bs.affix', ->
$(@).width('') $(@).width('')
$discussion = $('.issuable-discussion')
$sidebar = $('.issuable-sidebar')
discussionHeight = $discussion.height()
sidebarHeight = $sidebar.height()
console.log(sidebarHeight,discussionHeight)
if sidebarHeight > discussionHeight
$discussion.height(sidebarHeight + 50)
console.log('fixing issues')
return
# No affix if discussion is smaller than sidebar
$('.issuable-affix').affix offset: $('.issuable-affix').affix offset:
top: -> top: ->
@top = ($('.issuable-affix').offset().top - 70) @top = ($('.issuable-affix').offset().top - 70)
......
...@@ -6,7 +6,6 @@ class @Issue ...@@ -6,7 +6,6 @@ class @Issue
constructor: -> constructor: ->
# Prevent duplicate event bindings # Prevent duplicate event bindings
@disableTaskList() @disableTaskList()
if $('a.btn-close').length if $('a.btn-close').length
@initTaskList() @initTaskList()
@initIssueBtnEventListeners() @initIssueBtnEventListeners()
......
...@@ -50,11 +50,10 @@ class @MergeRequest ...@@ -50,11 +50,10 @@ class @MergeRequest
$this = $(this) $this = $(this)
if $this.data('submitted') if $this.data('submitted')
return return
e.preventDefault()
e.stopImmediatePropagation()
shouldSubmit = $this.hasClass('btn-comment') shouldSubmit = $this.hasClass('btn-comment')
console.log("shouldSubmit")
if shouldSubmit if shouldSubmit
e.preventDefault()
e.stopImmediatePropagation()
_this.submitNoteForm($this.closest('form'),$this) _this.submitNoteForm($this.closest('form'),$this)
submitNoteForm: (form, $button) => submitNoteForm: (form, $button) =>
......
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