Skip to content

Commit c0e1372

Browse files
committed
Fix InvisibleDropArea overlay disappearing when hovering a nested element (again).
1 parent 5c0bcc0 commit c0e1372

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/InvisibleDropArea/InvisibleDropArea.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,10 @@ const InvisibleDropArea = React.forwardRef(function InvisibleDropArea (props, re
8585
setDragOver(true)
8686
}
8787

88-
const handleDragLeave = () => {
89-
setDragOver(false)
88+
const handleDragLeave = (e) => {
89+
if (e.target === e.currentTarget) {
90+
setDragOver(false)
91+
}
9092
}
9193

9294
const handleSelectFiles = (files) => {

0 commit comments

Comments
 (0)