Bläddra i källkod

Fix EasyMDE image paste bug during refactoring (#18207)

tags/v1.16.0-rc1
wxiaoguang 2 år sedan
förälder
incheckning
70d7475356
Inget konto är kopplat till bidragsgivarens mejladress
2 ändrade filer med 9 tillägg och 4 borttagningar
  1. 4
    2
      web_src/js/features/repo-issue.js
  2. 5
    2
      web_src/js/features/repo-legacy.js

+ 4
- 2
web_src/js/features/repo-issue.js Visa fil

@@ -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
web_src/js/features/repo-legacy.js Visa fil

@@ -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) {

Laddar…
Avbryt
Spara