summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2021-11-20 12:12:59 +0000
committerGitHub <noreply@github.com>2021-11-20 20:12:59 +0800
commit0d69e64e03de735e7116813643a37a64d8418eb4 (patch)
tree9e94293acb5d0df6174673f2eb40b257a8780fcd
parent013fb73068281b45b33c72abaae0c42c8d79c499 (diff)
downloadgitea-0d69e64e03de735e7116813643a37a64d8418eb4.tar.gz
gitea-0d69e64e03de735e7116813643a37a64d8418eb4.zip
Make a.add-code-comment click handler an event handler (#17737)
Instead of directly attaching the add-code-comment on click handler to the a.add-code-comment elements - make this an event handler on the document instead. Fix #17736 Signed-off-by: Andrew Thornton <art27@cantab.net>
-rw-r--r--web_src/js/features/repo-issue.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/web_src/js/features/repo-issue.js b/web_src/js/features/repo-issue.js
index 3022a01d41..1476571cc7 100644
--- a/web_src/js/features/repo-issue.js
+++ b/web_src/js/features/repo-issue.js
@@ -480,7 +480,7 @@ export function initRepoPullRequestReview() {
$(this).closest('.menu').toggle('visible');
});
- $('a.add-code-comment').on('click', async function (e) {
+ $(document).on('click', 'a.add-code-comment', async function (e) {
if ($(e.target).hasClass('btn-add-single')) return; // https://github.com/go-gitea/gitea/issues/4745
e.preventDefault();