File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -547,7 +547,11 @@ function initIssueTemplateCommentEditors(commentForm: HTMLFormElement) {
547547 // deactivate all markdown editors
548548 showElem ( commentForm . querySelectorAll ( '.combo-editor-dropzone .form-field-real' ) ) ;
549549 hideElem ( commentForm . querySelectorAll ( '.combo-editor-dropzone .combo-markdown-editor' ) ) ;
550- hideElem ( commentForm . querySelectorAll ( '.combo-editor-dropzone .form-field-dropzone' ) ) ;
550+ queryElems ( commentForm , '.combo-editor-dropzone .form-field-dropzone' , ( dropzoneContainer ) => {
551+ const dropzone = dropzoneContainer . closest ( '.combo-editor-dropzone' ) ?. querySelector ( '.dropzone' ) ;
552+ const hasUploadedFiles = dropzone ?. querySelector ( '.dz-preview' ) !== null ;
553+ if ( ! hasUploadedFiles ) hideElem ( dropzoneContainer ) ;
554+ } ) ;
551555
552556 // activate this markdown editor
553557 hideElem ( fieldTextarea ) ;
You can’t perform that action at this time.
0 commit comments