Skip to content

Commit 70d7475

Browse files
authored
Fix EasyMDE image paste bug during refactoring (#18207)
1 parent 4f77645 commit 70d7475

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

web_src/js/features/repo-issue.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -458,8 +458,10 @@ export function initRepoPullRequestReview() {
458458

459459
const $reviewBox = $('.review-box');
460460
if ($reviewBox.length === 1) {
461-
createCommentEasyMDE($reviewBox.find('textarea'));
462-
initCompImagePaste($reviewBox);
461+
(async () => {
462+
await createCommentEasyMDE($reviewBox.find('textarea'));
463+
initCompImagePaste($reviewBox);
464+
})();
463465
}
464466

465467
// The following part is only for diff views

web_src/js/features/repo-legacy.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,13 @@ export function initRepoCommentForm() {
6464
});
6565
}
6666

67-
createCommentEasyMDE($('.comment.form textarea:not(.review-textarea)'));
67+
(async () => {
68+
await createCommentEasyMDE($('.comment.form textarea:not(.review-textarea)'));
69+
initCompImagePaste($('.comment.form'));
70+
})();
71+
6872
initBranchSelector();
6973
initCompMarkupContentPreviewTab($('.comment.form'));
70-
initCompImagePaste($('.comment.form'));
7174

7275
// List submits
7376
function initListSubmits(selector, outerSelector) {

0 commit comments

Comments
 (0)