From 84f8ef3df6316cb8fe8048556288452c07da4d7b Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Wed, 19 Jan 2022 01:28:38 +0800 Subject: Fix PR comments UI (#18323) Closes: * Review comment cannot be edited #17768 * Changing PR Comment Resolved State Disables Further Changes #18315 --- web_src/js/features/repo-diff.js | 2 +- web_src/js/features/repo-issue-content.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'web_src/js') diff --git a/web_src/js/features/repo-diff.js b/web_src/js/features/repo-diff.js index 3d937bbdb1..f877af7211 100644 --- a/web_src/js/features/repo-diff.js +++ b/web_src/js/features/repo-diff.js @@ -45,7 +45,7 @@ export function initRepoDiffConversationForm() { }); - $('.resolve-conversation').on('click', async function (e) { + $(document).on('click', '.resolve-conversation', async function (e) { e.preventDefault(); const comment_id = $(this).data('comment-id'); const origin = $(this).data('origin'); diff --git a/web_src/js/features/repo-issue-content.js b/web_src/js/features/repo-issue-content.js index 602523f89d..40e88fb1f3 100644 --- a/web_src/js/features/repo-issue-content.js +++ b/web_src/js/features/repo-issue-content.js @@ -109,7 +109,7 @@ export function initRepoIssueContentHistory() { if (!issueIndex) return; const $itemIssue = $('.repository.issue .timeline-item.comment.first'); // issue(PR) main content - const $comments = $('.repository.issue .comment-list .comment'); // includes: issue(PR) comments, code rerview comments + const $comments = $('.repository.issue .comment-list .comment'); // includes: issue(PR) comments, review comments, code comments if (!$itemIssue.length && !$comments.length) return; const repoLink = $('#repolink').val(); -- cgit v1.2.3