Dont open the upload modal unless a file is being dragged

This commit is contained in:
Jackson Harper 2023-08-04 12:24:46 +08:00
parent 40bbb3f972
commit 58c2a80572

View file

@ -952,7 +952,11 @@ function LibraryItemsLayout(props: LibraryItemsLayoutProps): JSX.Element {
{props.isValidating && props.items.length == 0 && <TopBarProgress />}
<div
onDragEnter={(event) => {
setShowUploadModal(true)
if (
event.dataTransfer.types.find((t) => t.toLowerCase() == 'files')
) {
setShowUploadModal(true)
}
}}
style={{ height: '100%', width: '100%' }}
>