Skip to content

Commit 3fda79c

Browse files
committed
Fix InvisibleDropArea hiding the overlay when the cursor hovers a child element.
1 parent 64d7284 commit 3fda79c

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/InvisibleDropArea/InvisibleDropArea.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,14 @@ const styles = theme => ({
1010
root: {
1111
position: 'relative'
1212
},
13+
dragOver: {
14+
'& *': {
15+
pointerEvents: 'none'
16+
},
17+
'& $overlay': {
18+
pointerEvents: 'default'
19+
}
20+
},
1321
overlay: {
1422
position: 'absolute',
1523
top: 0,
@@ -89,7 +97,8 @@ const InvisibleDropArea = React.forwardRef(function InvisibleDropArea (props, re
8997
<DropAreaBase
9098
{...other}
9199
className={classNames(classes.root, className, {
92-
[classes.disabled]: props.disabled
100+
[classes.disabled]: props.disabled,
101+
[classes.dragOver]: dragOver
93102
})}
94103
onAcceptedDragEnter={handleDragOver}
95104
onDragLeave={handleDragLeave}

0 commit comments

Comments
 (0)