Merge branch 'rs-issue-1340' into 'master'
Unbind task item checkbox events and then rebind them Fixes #1340 This issue was caused by this line: https://gitlab.com/gitlab-org/gitlab-ce/blob/master/app/views/projects/issues/update.js.haml#L17 `new Issue()` gets called on every JS-based issue update, and all the binds in the constructor get re-applied without first unbinding the existing ones. Right now my fix is *only* for the checkbox events, and I suspect there are similar issues still present for other events. See merge request !478
This commit is contained in:
commit
c14c03a88f
2 changed files with 4 additions and 12 deletions
|
@ -9,12 +9,8 @@ class @Issue
|
|||
if $("a.btn-close").length
|
||||
$("li.task-list-item input:checkbox").prop("disabled", false)
|
||||
|
||||
$(".task-list-item input:checkbox").on(
|
||||
"click"
|
||||
null
|
||||
"issue"
|
||||
updateTaskState
|
||||
)
|
||||
$('.task-list-item input:checkbox').off('change')
|
||||
$('.task-list-item input:checkbox').change('issue', updateTaskState)
|
||||
|
||||
$('.issue-details').waitForImages ->
|
||||
$('.issuable-affix').affix offset:
|
||||
|
|
|
@ -81,12 +81,8 @@ class @MergeRequest
|
|||
this.$('.remove_source_branch_in_progress').hide()
|
||||
this.$('.remove_source_branch_widget.failed').show()
|
||||
|
||||
$(".task-list-item input:checkbox").on(
|
||||
"click"
|
||||
null
|
||||
"merge_request"
|
||||
updateTaskState
|
||||
)
|
||||
$('.task-list-item input:checkbox').off('change')
|
||||
$('.task-list-item input:checkbox').change('merge_request', updateTaskState)
|
||||
|
||||
activateTab: (action) ->
|
||||
this.$('.merge-request-tabs li').removeClass 'active'
|
||||
|
|
Loading…
Reference in a new issue