Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion web_src/js/features/repo-issue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,14 @@ function initIssueTemplateCommentEditors(commentForm: HTMLFormElement) {
// deactivate all markdown editors
showElem(commentForm.querySelectorAll('.combo-editor-dropzone .form-field-real'));
hideElem(commentForm.querySelectorAll('.combo-editor-dropzone .combo-markdown-editor'));
hideElem(commentForm.querySelectorAll('.combo-editor-dropzone .form-field-dropzone'));
queryElems(commentForm, '.combo-editor-dropzone .form-field-dropzone', (dropzoneContainer) => {
const dropzoneEl = dropzoneContainer.closest<HTMLElement>('.combo-editor-dropzone')?.querySelector<HTMLElement>('.dropzone');
const dzInstance = dropzoneEl?.dropzone;

if (dzInstance && dzInstance.files.length === 0) {
hideElem(dropzoneContainer);
}
});

// activate this markdown editor
hideElem(fieldTextarea);
Expand Down