From 097d4e30b180eef30600beef2c08095e2571319c Mon Sep 17 00:00:00 2001 From: Felipe Leopoldo Sologuren GutiƩrrez Date: Fri, 9 Dec 2022 13:25:32 -0300 Subject: Change ID pattern of raw content container for issue (#21966) Implement differentiation to html id for issue raw content container. Fixes #21965 --- web_src/js/features/repo-issue.js | 2 +- web_src/js/features/repo-legacy.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'web_src') diff --git a/web_src/js/features/repo-issue.js b/web_src/js/features/repo-issue.js index 54cdeb383b..ca5d69c5a6 100644 --- a/web_src/js/features/repo-issue.js +++ b/web_src/js/features/repo-issue.js @@ -553,7 +553,7 @@ export function initRepoIssueReferenceIssue() { const $this = $(this); $this.closest('.dropdown').find('.menu').toggle('visible'); - const content = $(`#comment-${$this.data('target')}`).text(); + const content = $(`#${$this.data('target')}`).text(); const poster = $this.data('poster-username'); const reference = $this.data('reference'); const $modal = $($this.data('modal')); diff --git a/web_src/js/features/repo-legacy.js b/web_src/js/features/repo-legacy.js index d438186c5f..910d4bb56c 100644 --- a/web_src/js/features/repo-legacy.js +++ b/web_src/js/features/repo-legacy.js @@ -566,7 +566,7 @@ function initRepoIssueCommentEdit() { $(document).on('click', '.quote-reply', function (event) { $(this).closest('.dropdown').find('.menu').toggle('visible'); const target = $(this).data('target'); - const quote = $(`#comment-${target}`).text().replace(/\n/g, '\n> '); + const quote = $(`#${target}`).text().replace(/\n/g, '\n> '); const content = `> ${quote}\n\n`; let easyMDE; if ($(this).hasClass('quote-reply-diff')) { -- cgit v1.2.3