瀏覽代碼

add comment

Yuki Takei 2 年之前
父節點
當前提交
dce5c80499
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      packages/editor/src/components/CodeMirrorEditor/Toolbar/AttachmentsDropdownItem.tsx

+ 4 - 0
packages/editor/src/components/CodeMirrorEditor/Toolbar/AttachmentsDropdownItem.tsx

@@ -28,12 +28,16 @@ export const AttachmentsDropdownItem = (props: Props): JSX.Element => {
     getInputProps,
     open,
   } = useFileDropzone({
+    // close after uploading
+    // https://github.com/weseek/growi/pull/8564
     onUpload: (files: File[]) => { onUpload?.(files); onClose?.() },
     acceptedUploadFileType,
     dropzoneOpts: {
       noClick: true,
       noDrag: true,
       noKeyboard: true,
+      // close after cancelling
+      // https://github.com/weseek/growi/pull/8564
       onFileDialogCancel: onClose,
     },
   });