diff --git a/packages/core/src/components/upload/upload.scss b/packages/core/src/components/upload/upload.scss index 52234d8bd98..f3c65eb1dd7 100644 --- a/packages/core/src/components/upload/upload.scss +++ b/packages/core/src/components/upload/upload.scss @@ -53,7 +53,7 @@ } } - &.file-over { + &:not(.disabled).file-over { border-color: var(--theme-upload--border-color--dragover); border-style: solid; } @@ -73,10 +73,14 @@ } .upload-browser { - opacity: 0; + border: 0; + clip: rect(0 0 0 0); + height: 1px; + margin: -1px; overflow: hidden; + padding: 0; position: absolute; - z-index: -1; + width: 1px; } .loader { diff --git a/packages/core/src/components/upload/upload.tsx b/packages/core/src/components/upload/upload.tsx index 2cb7b7c4d05..e4dacfd21cd 100644 --- a/packages/core/src/components/upload/upload.tsx +++ b/packages/core/src/components/upload/upload.tsx @@ -111,8 +111,10 @@ export class Upload { } private fileOver(event: DragEvent) { - event.preventDefault(); - event.dataTransfer.dropEffect = 'move'; + if (this.state !== UploadFileState.LOADING) { + event.preventDefault(); + event.dataTransfer.dropEffect = 'move'; + } if (!this.multiple && event.dataTransfer.items.length > 1) { event.preventDefault(); @@ -206,12 +208,17 @@ export class Upload {