summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Schatz <jschatz@gitlab.com>2016-08-17 00:33:41 +0000
committerJacob Schatz <jschatz@gitlab.com>2016-08-17 00:33:41 +0000
commit07189d7aed52e784adf4d625d94838b44668b28e (patch)
tree94790f3b2955fe52974ce24ea023981378ad9d14
parent76aa85cc8023e1a8176f0b783a52154f98a5be8f (diff)
parent94f22826f30692f693dbd8f6ccdea91f4dba0bbb (diff)
downloadgitlab-ce-07189d7aed52e784adf4d625d94838b44668b28e.tar.gz
Merge branch 'no-comment-button-on-discussion-diffs' into 'master'
Don't show comment button in gutter of diffs on MR discussion tab When browsing to an MR, switching to the Changes tab, and switching back to the Discussions tab, the gutter of the diffs on that page would show the comment button on-hover, while it shouldn't, since comments on new lines can only be created from the Changes tab. ![Screen_Shot_2016-07-25_at_22.01.11](/uploads/6b044e1a3ecb34ddaa0af432833473aa/Screen_Shot_2016-07-25_at_22.01.11.png) `8-10-stable` counterpart at https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5493 See merge request !5492
-rw-r--r--app/assets/javascripts/files_comment_button.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/assets/javascripts/files_comment_button.js b/app/assets/javascripts/files_comment_button.js
index 09b5eb398d4..b2e49b71fec 100644
--- a/app/assets/javascripts/files_comment_button.js
+++ b/app/assets/javascripts/files_comment_button.js
@@ -33,7 +33,7 @@
this.render = bind(this.render, this);
this.VIEW_TYPE = $('input#view[type=hidden]').val();
debounce = _.debounce(this.render, DEBOUNCE_TIMEOUT_DURATION);
- $(document).off('mouseover', LINE_COLUMN_CLASSES).off('mouseleave', LINE_COLUMN_CLASSES).on('mouseover', LINE_COLUMN_CLASSES, debounce).on('mouseleave', LINE_COLUMN_CLASSES, this.destroy);
+ $(this.filesContainerElement).off('mouseover', LINE_COLUMN_CLASSES).off('mouseleave', LINE_COLUMN_CLASSES).on('mouseover', LINE_COLUMN_CLASSES, debounce).on('mouseleave', LINE_COLUMN_CLASSES, this.destroy);
}
FilesCommentButton.prototype.render = function(e) {