Skip to content

Commit 0d69e64

Browse files
authored
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 <[email protected]>
1 parent 013fb73 commit 0d69e64

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

web_src/js/features/repo-issue.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,7 @@ export function initRepoPullRequestReview() {
480480
$(this).closest('.menu').toggle('visible');
481481
});
482482

483-
$('a.add-code-comment').on('click', async function (e) {
483+
$(document).on('click', 'a.add-code-comment', async function (e) {
484484
if ($(e.target).hasClass('btn-add-single')) return; // https://github.com/go-gitea/gitea/issues/4745
485485
e.preventDefault();
486486

0 commit comments

Comments
 (0)