mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Dont open the upload modal unless a file is being dragged
This commit is contained in:
parent
40bbb3f972
commit
58c2a80572
1 changed files with 5 additions and 1 deletions
|
|
@ -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%' }}
|
||||
>
|
||||
|
|
|
|||
Loading…
Reference in a new issue