Drop Area: Fix dragging from the left side (#315)
This commit is contained in:
parent
62f742c023
commit
69694d1e54
@ -71,7 +71,11 @@ const DropArea: FC<OwnProps> = ({
|
|||||||
const { target: fromTarget, relatedTarget: toTarget } = e;
|
const { target: fromTarget, relatedTarget: toTarget } = e;
|
||||||
|
|
||||||
// Esc button pressed during drag event
|
// Esc button pressed during drag event
|
||||||
if ((fromTarget as HTMLDivElement).matches('.DropTarget, .DropArea') && !toTarget) {
|
if (
|
||||||
|
(fromTarget as HTMLDivElement).matches('.DropTarget, .DropArea') && (
|
||||||
|
!toTarget || !(toTarget as HTMLDivElement)!.matches('.DropTarget, .DropArea')
|
||||||
|
)
|
||||||
|
) {
|
||||||
hideTimeoutRef.current = window.setTimeout(() => {
|
hideTimeoutRef.current = window.setTimeout(() => {
|
||||||
onHide();
|
onHide();
|
||||||
}, DROP_LEAVE_TIMEOUT_MS);
|
}, DROP_LEAVE_TIMEOUT_MS);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user