Skip to content

Commit aef67da

Browse files
authored
Merge branch 'main' into lunny/fix_assign_project
2 parents fc65947 + 26ec628 commit aef67da

18 files changed

+106
-79
lines changed

options/locale/locale_cs-CZ.ini

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ webauthn_error_unable_to_process=Server nemohl zpracovat váš požadavek.
4646
webauthn_error_duplicated=Zabezpečovací klíč není pro tento požadavek povolen. Prosím ujistěte se, zda klíč není již registrován.
4747
webauthn_error_empty=Musíte nastavit název tohoto klíče.
4848
webauthn_error_timeout=Požadavek vypršel dříve, než se podařilo přečíst váš klíč. Znovu načtěte tuto stránku a akci opakujte.
49-
webauthn_u2f_deprecated=Klíč: „%s“ autentifikuje pomocí zastaralého procesu U2F. Měli byste znovu zaregistrovat tento klíč a zrušit starou registraci.
5049
webauthn_reload=Znovu načíst
5150

5251
repository=Repozitář

options/locale/locale_de-DE.ini

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ webauthn_error_unable_to_process=Der Server konnte deine Anfrage nicht bearbeite
4747
webauthn_error_duplicated=Für diese Anfrage ist der Sicherheitsschlüssel nicht erlaubt. Bitte stell sicher, dass er nicht bereits registriert ist.
4848
webauthn_error_empty=Du musst einen Namen für diesen Schlüssel festlegen.
4949
webauthn_error_timeout=Das Zeitlimit wurde erreicht, bevor dein Schlüssel gelesen werden konnte. Bitte lade die Seite erneut.
50-
webauthn_u2f_deprecated=Der Schlüssel: '%s' authentifiziert sich über den veralteten U2F-Prozess. Bitte registriere den Schlüssel neu und lösche die alte Registrierung.
5150
webauthn_reload=Neu laden
5251

5352
repository=Repository
@@ -1516,7 +1515,7 @@ pulls.tab_conversation=Diskussion
15161515
pulls.tab_commits=Commits
15171516
pulls.tab_files=Geänderte Dateien
15181517
pulls.reopen_to_merge=Bitte diesen Pull-Request wieder öffnen, um zu mergen.
1519-
pulls.cant_reopen_deleted_branch=Dieser Pull-Request kann nicht wieder geöffnet werden, da die Branche bereits gelöscht wurde.
1518+
pulls.cant_reopen_deleted_branch=Dieser Pull-Request kann nicht wieder geöffnet werden, da die Branch bereits gelöscht wurde.
15201519
pulls.merged=Zusammengeführt
15211520
pulls.merged_as=Der Pull Request wurde als <a rel="nofollow" class="ui sha" href="%[1]s"><code>%[2]s</code></a> gemergt.
15221521
pulls.manually_merged=Manuell gemergt

options/locale/locale_el-GR.ini

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ webauthn_error_unable_to_process=Ο διακομιστής δεν μπόρεσε
4747
webauthn_error_duplicated=Το κλειδί ασφαλείας δεν επιτρέπεται για αυτό το αίτημα. Βεβαιωθείτε ότι το κλειδί δεν έχει ήδη καταχωρηθεί.
4848
webauthn_error_empty=Πρέπει να ορίσετε ένα όνομα για αυτό το κλειδί.
4949
webauthn_error_timeout=Το χρονικό όριο έφτασε πριν το κλειδί να διαβαστεί. Παρακαλώ ανανεώστε τη σελίδα και προσπαθήστε ξανά.
50-
webauthn_u2f_deprecated=Το κλειδί: '%s' πιστοποιεί χρησιμοποιώντας το παρωχημένο πρωτόκολλο U2F. Θα πρέπει να καταχωρήσετε ξανά αυτό το κλειδί και να καταργήσετε την παλιά εγγραφή.
5150
webauthn_reload=Ανανέωση
5251

5352
repository=Αποθετήριο
@@ -1276,7 +1275,7 @@ issues.filter_sort=Ταξινόμηση
12761275
issues.filter_sort.latest=Νεότερα
12771276
issues.filter_sort.oldest=Παλαιότερα
12781277
issues.filter_sort.recentupdate=Ενημερώθηκαν πρόσφατα
1279-
issues.filter_sort.leastupdate=Λιγότερο πρόσφατα ανανεωμένο
1278+
issues.filter_sort.leastupdate=Ενημερώθηκαν παλαιότερα
12801279
issues.filter_sort.mostcomment=Περισσότερο σχολιασμένα
12811280
issues.filter_sort.leastcomment=Λιγότερο σχολιασμένα
12821281
issues.filter_sort.nearduedate=Πλησιέστερη παράδοση

options/locale/locale_es-ES.ini

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ webauthn_error_unable_to_process=El servidor no pudo procesar su solicitud.
4747
webauthn_error_duplicated=La clave de seguridad no está permitida para esta solicitud. Por favor, asegúrese de que la clave no está ya registrada.
4848
webauthn_error_empty=Debe establecer un nombre para esta clave.
4949
webauthn_error_timeout=Tiempo de espera máximo alcanzado antes de que su clave pudiese ser leída. Por favor, cargue la página y vuelva a intentarlo.
50-
webauthn_u2f_deprecated=La clave: '%s' se autentifica usando el proceso U2F obsoleto. Debe volver a registrar esta clave y eliminar el registro antiguo.
5150
webauthn_reload=Recargar
5251

5352
repository=Repositorio
@@ -1610,6 +1609,8 @@ pulls.auto_merge_canceled_schedule=Fusión automaticá estaba cancellada para es
16101609
pulls.auto_merge_newly_scheduled_comment=`programó este Pull Request para fusionar automática cuando todas las comprobaciones tengan éxito %[1]s`
16111610
pulls.auto_merge_canceled_schedule_comment=`canceló la fusión automática de este Pull Request %[1]s`
16121611

1612+
pulls.delete.title=¿Borrar este pull request?
1613+
pulls.delete.text=¿Realmente quieres eliminar esta pull request? (Esto eliminará permanentemente todo el contenido. Considera cerrarlo si simplemente deseas archivarlo)
16131614

16141615
milestones.new=Nuevo hito
16151616
milestones.closed=Cerrada %s

options/locale/locale_is-IS.ini

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ webauthn_error_unable_to_process=Netþjónninn gat ekki ráðið við beiðni þ
4646
webauthn_error_duplicated=Öryggislykillinn er ekki leyfður fyrir þessa beiðni. Gakktu úr skugga um að lykillinn sé ekki þegar skráður.
4747
webauthn_error_empty=Þú verður að setja nafn fyrir þennan lykil.
4848
webauthn_error_timeout=Tímamörk náð áður en hægt var að lesa lykilinn þinn. Vinsamlegast endurhlaðið þessa síðu og reyndu aftur.
49-
webauthn_u2f_deprecated=Lykillinn: „%s“ auðkennir með því að nota úrelta U2F aðferð. Þú ættir að endurskrá þennan lykil og fjarlægja gömlu skráninguna.
5049
webauthn_reload=Endurhlaða
5150

5251
repository=Hugbúnaðarsafn

options/locale/locale_ja-JP.ini

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ webauthn_error_unable_to_process=サーバーがリクエストを処理でき
4747
webauthn_error_duplicated=このリクエストに対しては、許可されていないセキュリティキーです。 キーが未登録であることを確認してください。
4848
webauthn_error_empty=このキーに名前を設定する必要があります。
4949
webauthn_error_timeout=キーを読み取る前にタイムアウトになりました。 このページをリロードしてもう一度やり直してください。
50-
webauthn_u2f_deprecated=キー: '%s' は非推奨のU2Fプロセスを使用して認証しています。このキーを再登録して古い登録を削除したほうが良いでしょう。
5150
webauthn_reload=リロード
5251

5352
repository=リポジトリ

options/locale/locale_lv-LV.ini

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ webauthn_error_unable_to_process=Serveris nevar apstrādāt Jūsu pieprasījumu.
4747
webauthn_error_duplicated=Drošības atslēga nav atļauta šim pieprasījumam. Pārliecinieties, ka šī atslēga jau nav reģistrēta.
4848
webauthn_error_empty=Norādiet atslēgas nosaukumu.
4949
webauthn_error_timeout=Iestājusies noildze, mēģinot, nolasīt atslēgu. Pārlādējiet lapu un mēģiniet vēlreiz.
50-
webauthn_u2f_deprecated=Atslēga '%s' izmanto novecojušu U2F procesu. Noņemiet iepriekšējo reģistrāciju un veiciet reģistrācijas procesu no jauna.
5150
webauthn_reload=Pārlādēt
5251

5352
repository=Repozitorijs

options/locale/locale_pl-PL.ini

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ webauthn_error_unable_to_process=Serwer nie mógł obsłużyć Twojego żądania
4646
webauthn_error_duplicated=Klucz bezpieczeństwa nie jest dozwolony dla tego żądania. Upewnij się, że klucz nie jest już zarejestrowany.
4747
webauthn_error_empty=Musisz ustawić nazwę dla tego klucza.
4848
webauthn_error_timeout=Osiągnięto limit czasu zanim Twój klucz może zostać odczytany. Odśwież stronę i spróbuj ponownie.
49-
webauthn_u2f_deprecated=Klucz '%s' uwierzytelnia przy użyciu przestarzałego procesu U2F. Powinieneś ponownie zarejestrować ten klucz i usunąć starą rejestrację.
5049
webauthn_reload=Odśwież
5150

5251
repository=Repozytorium

options/locale/locale_pt-BR.ini

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ webauthn_error_unable_to_process=O servidor não pôde processar sua solicitaç
4646
webauthn_error_duplicated=A chave de segurança não é permitida para esta solicitação. Por favor, certifique-se que a chave já não está registrada.
4747
webauthn_error_empty=Você deve definir um nome para esta chave.
4848
webauthn_error_timeout=Tempo limite atingido antes de sua chave poder ser lida. Por favor, recarregue esta página e tente novamente.
49-
webauthn_u2f_deprecated=A chave: '%s' autentica utilizando o processo U2F descontinuado. Você deve registrar novamente esta chave e remover o registro antigo.
5049
webauthn_reload=Recarregar
5150

5251
repository=Repositório

options/locale/locale_pt-PT.ini

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ webauthn_error_unable_to_process=O servidor não conseguiu processar o seu pedid
4747
webauthn_error_duplicated=A chave de segurança não é permitida neste pedido. Certifique-se de que a chave não está já registada.
4848
webauthn_error_empty=Você tem que definir um nome para esta chave.
4949
webauthn_error_timeout=O tempo limite foi atingido antes que a sua chave pudesse ser lida. Recarregue esta página e tente novamente.
50-
webauthn_u2f_deprecated=A chave: '%s' autentica usando o processo U2F, mas este foi descontinuado. Você deveria registar novamente esta chave e remover o registo antigo.
5150
webauthn_reload=Recarregar
5251

5352
repository=Repositório

options/locale/locale_zh-CN.ini

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ webauthn_error_unable_to_process=服务器无法处理您的请求。
4747
webauthn_error_duplicated=此安全密钥未被许可用于这个请求。请确保该密钥尚未注册。
4848
webauthn_error_empty=您必须为此密钥设置一个名称。
4949
webauthn_error_timeout=未能在允许的时限内读取密钥。请重新加载此页面并重试。
50-
webauthn_u2f_deprecated=密钥 '%s' 使用的是已经废弃的 U2F 进行身份验证。您应该重新注册此密钥并删除旧的注册。
5150
webauthn_reload=重新加载
5251

5352
repository=仓库

options/locale/locale_zh-TW.ini

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ webauthn_error_unable_to_process=伺服器無法執行您的請求。
4747
webauthn_error_duplicated=此請求不允許使用這個安全金鑰。請確保該金鑰尚未註冊。
4848
webauthn_error_empty=您必須命名此金鑰。
4949
webauthn_error_timeout=在成功讀取金鑰之前已逾時,請重新載入此頁面並重試。
50-
webauthn_u2f_deprecated=「%s」金鑰使用已廢棄的 U2F 流程進行驗證。您應該重新註冊此金鑰並將先前註冊的移除。
5150
webauthn_reload=重新載入
5251

5352
repository=儲存庫

web_src/js/features/comp/EasyMDE.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ export async function createCommentEasyMDE(textarea, easyMDEOptions = {}) {
3838
indentWithTabs: false,
3939
tabSize: 4,
4040
spellChecker: false,
41+
inputStyle: 'contenteditable', // nativeSpellcheck requires contenteditable
42+
nativeSpellcheck: true,
4143
toolbar: ['bold', 'italic', 'strikethrough', '|',
4244
'heading-1', 'heading-2', 'heading-3', 'heading-bigger', 'heading-smaller', '|',
4345
'code', 'quote', '|', {
Lines changed: 84 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import $ from 'jquery';
2+
23
const {csrfToken} = window.config;
34

45
async function uploadFile(file, uploadUrl) {
@@ -21,72 +22,104 @@ function clipboardPastedImages(e) {
2122
if (!item.type || !item.type.startsWith('image/')) continue;
2223
files.push(item.getAsFile());
2324
}
24-
25-
if (files.length) {
26-
e.preventDefault();
27-
e.stopPropagation();
28-
}
2925
return files;
3026
}
3127

28+
class TextareaEditor {
29+
constructor(editor) {
30+
this.editor = editor;
31+
}
3232

33-
function insertAtCursor(field, value) {
34-
if (field.selectionStart || field.selectionStart === 0) {
35-
const startPos = field.selectionStart;
36-
const endPos = field.selectionEnd;
37-
field.value = field.value.substring(0, startPos) + value + field.value.substring(endPos, field.value.length);
38-
field.selectionStart = startPos + value.length;
39-
field.selectionEnd = startPos + value.length;
40-
} else {
41-
field.value += value;
33+
insertPlaceholder(value) {
34+
const editor = this.editor;
35+
const startPos = editor.selectionStart;
36+
const endPos = editor.selectionEnd;
37+
editor.value = editor.value.substring(0, startPos) + value + editor.value.substring(endPos);
38+
editor.selectionStart = startPos;
39+
editor.selectionEnd = startPos + value.length;
40+
editor.focus();
41+
}
42+
43+
replacePlaceholder(oldVal, newVal) {
44+
const editor = this.editor;
45+
const startPos = editor.selectionStart;
46+
const endPos = editor.selectionEnd;
47+
if (editor.value.substring(startPos, endPos) === oldVal) {
48+
editor.value = editor.value.substring(0, startPos) + newVal + editor.value.substring(endPos);
49+
editor.selectionEnd = startPos + newVal.length;
50+
} else {
51+
editor.value = editor.value.replace(oldVal, newVal);
52+
editor.selectionEnd -= oldVal.length;
53+
editor.selectionEnd += newVal.length;
54+
}
55+
editor.selectionStart = editor.selectionEnd;
56+
editor.focus();
4257
}
4358
}
4459

45-
function replaceAndKeepCursor(field, oldval, newval) {
46-
if (field.selectionStart || field.selectionStart === 0) {
47-
const startPos = field.selectionStart;
48-
const endPos = field.selectionEnd;
49-
field.value = field.value.replace(oldval, newval);
50-
field.selectionStart = startPos + newval.length - oldval.length;
51-
field.selectionEnd = endPos + newval.length - oldval.length;
52-
} else {
53-
field.value = field.value.replace(oldval, newval);
60+
class CodeMirrorEditor {
61+
constructor(editor) {
62+
this.editor = editor;
63+
}
64+
65+
insertPlaceholder(value) {
66+
const editor = this.editor;
67+
const startPoint = editor.getCursor('start');
68+
const endPoint = editor.getCursor('end');
69+
editor.replaceSelection(value);
70+
endPoint.ch = startPoint.ch + value.length;
71+
editor.setSelection(startPoint, endPoint);
72+
editor.focus();
73+
}
74+
75+
replacePlaceholder(oldVal, newVal) {
76+
const editor = this.editor;
77+
const endPoint = editor.getCursor('end');
78+
if (editor.getSelection() === oldVal) {
79+
editor.replaceSelection(newVal);
80+
} else {
81+
editor.setValue(editor.getValue().replace(oldVal, newVal));
82+
}
83+
endPoint.ch -= oldVal.length;
84+
endPoint.ch += newVal.length;
85+
editor.setSelection(endPoint, endPoint);
86+
editor.focus();
5487
}
5588
}
5689

57-
export function initCompImagePaste($target) {
58-
$target.each(function () {
59-
const dropzone = this.querySelector('.dropzone');
60-
if (!dropzone) {
90+
91+
export function initEasyMDEImagePaste(easyMDE, $dropzone) {
92+
const uploadUrl = $dropzone.attr('data-upload-url');
93+
const $files = $dropzone.find('.files');
94+
95+
if (!uploadUrl || !$files.length) return;
96+
97+
const uploadClipboardImage = async (editor, e) => {
98+
const pastedImages = clipboardPastedImages(e);
99+
if (!pastedImages || pastedImages.length === 0) {
61100
return;
62101
}
63-
const uploadUrl = dropzone.getAttribute('data-upload-url');
64-
const dropzoneFiles = dropzone.querySelector('.files');
65-
for (const textarea of this.querySelectorAll('textarea')) {
66-
textarea.addEventListener('paste', async (e) => {
67-
for (const img of clipboardPastedImages(e)) {
68-
const name = img.name.slice(0, img.name.lastIndexOf('.'));
69-
insertAtCursor(textarea, `![${name}]()`);
70-
const data = await uploadFile(img, uploadUrl);
71-
replaceAndKeepCursor(textarea, `![${name}]()`, `![${name}](/attachments/${data.uuid})`);
72-
const input = $(`<input id="${data.uuid}" name="files" type="hidden">`).val(data.uuid);
73-
dropzoneFiles.appendChild(input[0]);
74-
}
75-
}, false);
76-
}
77-
});
78-
}
102+
e.preventDefault();
103+
e.stopPropagation();
79104

80-
export function initEasyMDEImagePaste(easyMDE, dropzone, files) {
81-
const uploadUrl = dropzone.getAttribute('data-upload-url');
82-
easyMDE.codemirror.on('paste', async (_, e) => {
83-
for (const img of clipboardPastedImages(e)) {
105+
for (const img of pastedImages) {
84106
const name = img.name.slice(0, img.name.lastIndexOf('.'));
107+
108+
const placeholder = `![${name}](uploading ...)`;
109+
editor.insertPlaceholder(placeholder);
85110
const data = await uploadFile(img, uploadUrl);
86-
const pos = easyMDE.codemirror.getCursor();
87-
easyMDE.codemirror.replaceRange(`![${name}](/attachments/${data.uuid})`, pos);
88-
const input = $(`<input id="${data.uuid}" name="files" type="hidden">`).val(data.uuid);
89-
files.append(input);
111+
editor.replacePlaceholder(placeholder, `![${name}](/attachments/${data.uuid})`);
112+
113+
const $input = $(`<input name="files" type="hidden">`).attr('id', data.uuid).val(data.uuid);
114+
$files.append($input);
90115
}
116+
};
117+
118+
easyMDE.codemirror.on('paste', async (_, e) => {
119+
return uploadClipboardImage(new CodeMirrorEditor(easyMDE.codemirror), e);
120+
});
121+
122+
$(easyMDE.element).on('paste', async (e) => {
123+
return uploadClipboardImage(new TextareaEditor(easyMDE.element), e.originalEvent);
91124
});
92125
}

web_src/js/features/repo-issue.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import $ from 'jquery';
22
import {htmlEscape} from 'escape-goat';
33
import attachTribute from './tribute.js';
44
import {createCommentEasyMDE, getAttachedEasyMDE} from './comp/EasyMDE.js';
5-
import {initCompImagePaste} from './comp/ImagePaste.js';
5+
import {initEasyMDEImagePaste} from './comp/ImagePaste.js';
66
import {initCompMarkupContentPreviewTab} from './comp/MarkupContentPreview.js';
77

88
const {appSubUrl, csrfToken} = window.config;
@@ -480,8 +480,9 @@ export function initRepoPullRequestReview() {
480480
// the editor's height is too large in some cases, and the panel cannot be scrolled with page now because there is `.repository .diff-detail-box.sticky { position: sticky; }`
481481
// the temporary solution is to make the editor's height smaller (about 4 lines). GitHub also only show 4 lines for default. We can improve the UI (including Dropzone area) in future
482482
// EasyMDE's options can not handle minHeight & maxHeight together correctly, we have to set max-height for .CodeMirror-scroll in CSS.
483-
await createCommentEasyMDE($reviewBox.find('textarea'), {minHeight: '80px'});
484-
initCompImagePaste($reviewBox);
483+
const $reviewTextarea = $reviewBox.find('textarea');
484+
const easyMDE = await createCommentEasyMDE($reviewTextarea, {minHeight: '80px'});
485+
initEasyMDEImagePaste(easyMDE, $reviewBox.find('.dropzone'));
485486
})();
486487
}
487488

web_src/js/features/repo-legacy.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import $ from 'jquery';
22
import {createCommentEasyMDE, getAttachedEasyMDE} from './comp/EasyMDE.js';
33
import {initCompMarkupContentPreviewTab} from './comp/MarkupContentPreview.js';
4-
import {initCompImagePaste, initEasyMDEImagePaste} from './comp/ImagePaste.js';
4+
import {initEasyMDEImagePaste} from './comp/ImagePaste.js';
55
import {
66
initRepoIssueBranchSelect, initRepoIssueCodeCommentCancel,
77
initRepoIssueCommentDelete,
@@ -33,7 +33,8 @@ import initRepoPullRequestMergeForm from './repo-issue-pr-form.js';
3333
const {csrfToken} = window.config;
3434

3535
export function initRepoCommentForm() {
36-
if ($('.comment.form').length === 0) {
36+
const $commentForm = $('.comment.form');
37+
if ($commentForm.length === 0) {
3738
return;
3839
}
3940

@@ -67,12 +68,13 @@ export function initRepoCommentForm() {
6768
}
6869

6970
(async () => {
70-
await createCommentEasyMDE($('.comment.form textarea:not(.review-textarea)'));
71-
initCompImagePaste($('.comment.form'));
71+
const $textarea = $commentForm.find('textarea:not(.review-textarea)');
72+
const easyMDE = await createCommentEasyMDE($textarea);
73+
initEasyMDEImagePaste(easyMDE, $commentForm.find('.dropzone'));
7274
})();
7375

7476
initBranchSelector();
75-
initCompMarkupContentPreviewTab($('.comment.form'));
77+
initCompMarkupContentPreviewTab($commentForm);
7678

7779
// List submits
7880
function initListSubmits(selector, outerSelector) {
@@ -352,9 +354,7 @@ async function onEditContent(event) {
352354
easyMDE = await createCommentEasyMDE($textarea);
353355

354356
initCompMarkupContentPreviewTab($editContentForm);
355-
if ($dropzone.length === 1) {
356-
initEasyMDEImagePaste(easyMDE, $dropzone[0], $dropzone.find('.files'));
357-
}
357+
initEasyMDEImagePaste(easyMDE, $dropzone);
358358

359359
const $saveButton = $editContentZone.find('.save.button');
360360
$textarea.on('ce-quick-submit', () => {

web_src/js/features/repo-release.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,9 @@ export function initRepoReleaseEditor() {
2323
(async () => {
2424
const $textarea = $editor.find('textarea');
2525
await attachTribute($textarea.get(), {mentions: false, emoji: true});
26-
const $files = $editor.parent().find('.files');
2726
const easyMDE = await createCommentEasyMDE($textarea);
2827
initCompMarkupContentPreviewTab($editor);
29-
const dropzone = $editor.parent().find('.dropzone')[0];
30-
initEasyMDEImagePaste(easyMDE, dropzone, $files);
28+
const $dropzone = $editor.parent().find('.dropzone');
29+
initEasyMDEImagePaste(easyMDE, $dropzone);
3130
})();
3231
}

0 commit comments

Comments
 (0)