Commit bae17911 authored by Jacob Schatz's avatar Jacob Schatz Committed by Ruben Davila

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
parent 26d872e5
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
this.render = bind(this.render, this); this.render = bind(this.render, this);
this.VIEW_TYPE = $('input#view[type=hidden]').val(); this.VIEW_TYPE = $('input#view[type=hidden]').val();
debounce = _.debounce(this.render, DEBOUNCE_TIMEOUT_DURATION); 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) { FilesCommentButton.prototype.render = function(e) {
......
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