mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-24 07:13:33 +01:00
Handle "comment form combo editor init" more gracefully (#26688)
Now Gitea exposes unhandled promise rejection messages as error message on the UI. The "comment form" was quite unclear before, so it should be handled more gracefully to avoid such error.
This commit is contained in:
parent
083b0b4770
commit
f67f57a4c2
1 changed files with 3 additions and 2 deletions
|
@ -54,9 +54,10 @@ export function initRepoCommentForm() {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($commentForm.find('.field.combo-editor-dropzone').length) {
|
if ($commentForm.find('.field.combo-editor-dropzone').length) {
|
||||||
// at the moment, if a form has multiple combo-markdown-editors, it must be a issue template form
|
// at the moment, if a form has multiple combo-markdown-editors, it must be an issue template form
|
||||||
initIssueTemplateCommentEditors($commentForm);
|
initIssueTemplateCommentEditors($commentForm);
|
||||||
} else {
|
} else if ($commentForm.find('.combo-markdown-editor').length) {
|
||||||
|
// it's quite unclear about the "comment form" elements, sometimes it's for issue comment, sometimes it's for file editor/uploader message
|
||||||
initSingleCommentEditor($commentForm);
|
initSingleCommentEditor($commentForm);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue