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 @@ -542,7 +542,11 @@ function initIssueTemplateCommentEditors(commentForm: HTMLFormElement) {
542542 // deactivate all markdown editors
543543 showElem ( commentForm . querySelectorAll ( '.combo-editor-dropzone .form-field-real' ) ) ;
544544 hideElem ( commentForm . querySelectorAll ( '.combo-editor-dropzone .combo-markdown-editor' ) ) ;
545- hideElem ( commentForm . querySelectorAll ( '.combo-editor-dropzone .form-field-dropzone' ) ) ;
545+ queryElems ( commentForm , '.combo-editor-dropzone .form-field-dropzone' , ( dropzoneContainer ) => {
546+ const dropzone = dropzoneContainer . closest ( '.combo-editor-dropzone' ) ?. querySelector ( '.dropzone' ) ;
547+ const hasUploadedFiles = dropzone ?. querySelector ( '.dz-preview' ) !== null ;
548+ if ( ! hasUploadedFiles ) hideElem ( dropzoneContainer ) ;
549+ } ) ;
546550
547551 // activate this markdown editor
548552 hideElem ( fieldTextarea ) ;
You can’t perform that action at this time.
0 commit comments