From d7494046ac8aaf3b01f0eae0039e38c6c4f9c246 Mon Sep 17 00:00:00 2001 From: Rob Watson Date: Wed, 29 May 2019 17:16:13 +0200 Subject: [PATCH] bug fix: add single comment in split diff mode (#4745) (#7052) Signed-off-by: Rob Watson --- public/js/index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/public/js/index.js b/public/js/index.js index 745a63143..96a56a424 100644 --- a/public/js/index.js +++ b/public/js/index.js @@ -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');