summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Schatz <jschatz@gitlab.com>2016-08-17 00:33:41 +0000
committerRuben Davila <rdavila84@gmail.com>2016-08-18 10:58:40 -0500
commitbae17911d366398cc66bfb5d42ce085a23357fd1 (patch)
tree13de3ffa6e592c3e6dfaf192d041d991a4b405df
parent26d872e5e4c68d6ed1813edce155ec4d18c3ca76 (diff)
downloadgitlab-ce-bae17911d366398cc66bfb5d42ce085a23357fd1.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) {