summaryrefslogtreecommitdiffstats
path: root/public/js
diff options
context:
space:
mode:
authorRob Watson <rfwatson@users.noreply.github.com>2019-05-29 17:16:13 +0200
committerzeripath <art27@cantab.net>2019-05-29 16:16:12 +0100
commitd7494046ac8aaf3b01f0eae0039e38c6c4f9c246 (patch)
treed838842d4663b9e145ea56a721efc94a4203aad9 /public/js
parent57b2ce03d5081bdf7996879be2da300e8f4c6f58 (diff)
downloadgitea-d7494046ac8aaf3b01f0eae0039e38c6c4f9c246.tar.gz
gitea-d7494046ac8aaf3b01f0eae0039e38c6c4f9c246.zip
bug fix: add single comment in split diff mode (#4745) (#7052)
Signed-off-by: Rob Watson <rfwatson@users.noreply.github.com>
Diffstat (limited to 'public/js')
-rw-r--r--public/js/index.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/public/js/index.js b/public/js/index.js
index 745a631435..96a56a4241 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');