Fix EasyMDE image paste bug during refactoring (#18207)

This commit is contained in:
wxiaoguang authored and GitHub committed 2022-01-08 21:33:32 +08:00
1 parent 4f7764561a
commit 70d7475356
2 files changed
+9 -4

No files matched your search

+4 -2
View File
@@ -458,8 +458,10 @@ export function initRepoPullRequestReview() {
const $reviewBox = $('.review-box');
if ($reviewBox.length === 1) {
createCommentEasyMDE($reviewBox.find('textarea'));
initCompImagePaste($reviewBox);
(async () => {
await createCommentEasyMDE($reviewBox.find('textarea'));
initCompImagePaste($reviewBox);
})();
}
// The following part is only for diff views
+5 -2
View File
@@ -64,10 +64,13 @@ export function initRepoCommentForm() {
});
}
createCommentEasyMDE($('.comment.form textarea:not(.review-textarea)'));
(async () => {
await createCommentEasyMDE($('.comment.form textarea:not(.review-textarea)'));
initCompImagePaste($('.comment.form'));
})();
initBranchSelector();
initCompMarkupContentPreviewTab($('.comment.form'));
initCompImagePaste($('.comment.form'));
// List submits
function initListSubmits(selector, outerSelector) {