Skip to content

Commit

Permalink
Drop Area: Fix dragging from the left side (#315)
Browse files Browse the repository at this point in the history
  • Loading branch information
abolfazl-omidvarr authored Nov 12, 2023
1 parent 62f742c commit 69694d1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/components/middle/composer/DropArea.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,11 @@ const DropArea: FC<OwnProps> = ({
const { target: fromTarget, relatedTarget: toTarget } = e;

// 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(() => {
onHide();
}, DROP_LEAVE_TIMEOUT_MS);
Expand Down

0 comments on commit 69694d1

Please sign in to comment.