diff options
Diffstat (limited to 'web_src/js/features/repo-issue.js')
-rw-r--r-- | web_src/js/features/repo-issue.js | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/web_src/js/features/repo-issue.js b/web_src/js/features/repo-issue.js index 545f59a4d8..c2b0254a81 100644 --- a/web_src/js/features/repo-issue.js +++ b/web_src/js/features/repo-issue.js @@ -1,6 +1,6 @@ import {htmlEscape} from 'escape-goat'; import attachTribute from './tribute.js'; -import {createCommentEasyMDE, getAttachedEasyMDE} from './comp/CommentEasyMDE.js'; +import {createCommentEasyMDE, getAttachedEasyMDE} from './comp/EasyMDE.js'; import {initCompImagePaste} from './comp/ImagePaste.js'; import {initCompMarkupContentPreviewTab} from './comp/MarkupContentPreview.js'; @@ -439,16 +439,17 @@ export function initRepoPullRequestReview() { $(`#show-outdated-${id}`).removeClass('hide'); }); - $(document).on('click', 'button.comment-form-reply', function (e) { + $(document).on('click', 'button.comment-form-reply', async function (e) { e.preventDefault(); + $(this).hide(); const form = $(this).closest('.comment-code-cloud').find('.comment-form'); form.removeClass('hide'); const $textarea = form.find('textarea'); let easyMDE = getAttachedEasyMDE($textarea); if (!easyMDE) { - attachTribute($textarea.get(), {mentions: true, emoji: true}); - easyMDE = createCommentEasyMDE($textarea); + await attachTribute($textarea.get(), {mentions: true, emoji: true}); + easyMDE = await createCommentEasyMDE($textarea); } $textarea.focus(); easyMDE.codemirror.focus(); @@ -515,8 +516,8 @@ export function initRepoPullRequestReview() { td.find("input[name='side']").val(side === 'left' ? 'previous' : 'proposed'); td.find("input[name='path']").val(path); const $textarea = commentCloud.find('textarea'); - attachTribute($textarea.get(), {mentions: true, emoji: true}); - const easyMDE = createCommentEasyMDE($textarea); + await attachTribute($textarea.get(), {mentions: true, emoji: true}); + const easyMDE = await createCommentEasyMDE($textarea); $textarea.focus(); easyMDE.codemirror.focus(); } |