File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -547,7 +547,14 @@ 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 dropzoneEl = dropzoneContainer . closest < HTMLElement > ( '.combo-editor-dropzone' ) ?. querySelector < HTMLElement > ( '.dropzone' ) ;
552+ const dzInstance = dropzoneEl ?. dropzone ;
553+
554+ if ( dzInstance && dzInstance . files . length === 0 ) {
555+ hideElem ( dropzoneContainer ) ;
556+ }
557+ } ) ;
551558
552559 // activate this markdown editor
553560 hideElem ( fieldTextarea ) ;
You can’t perform that action at this time.
0 commit comments