Skip to content

Commit

Permalink
bug fix: add single comment in split diff mode (#4745) (#7052)
Browse files Browse the repository at this point in the history
Signed-off-by: Rob Watson <rfwatson@users.noreply.github.com>
  • Loading branch information
rfwatson authored and zeripath committed May 29, 2019
1 parent 57b2ce0 commit d749404
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions public/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1048,6 +1048,10 @@ function initPullRequestReview() {
$(this).closest('tr').removeClass('focus-lines-new focus-lines-old');
});
$('.add-code-comment').on('click', function(e) {
// https://github.com/go-gitea/gitea/issues/4745
if ($(e.target).hasClass('btn-add-single')) {
return;
}
e.preventDefault();
var isSplit = $(this).closest('.code-diff').hasClass('code-diff-split');
var side = $(this).data('side');
Expand Down

0 comments on commit d749404

Please sign in to comment.