# Fix drag and drop logic in div's mouse handling · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/ee8e1454fcb2edb90fa1ceb10b1f9dd508756327)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: ee8e1454fcb2edb90fa1ceb10b1f9dd508756327

Requested commit: ee8e1454fcb2edb90fa1ceb10b1f9dd508756327

Commit: ee8e1454fcb2edb90fa1ceb10b1f9dd508756327

Tree: d9ab2a58c6865e69ed1a1d291edd985ac49f8e24

Author: Max Brunsfeld

Committer: Max Brunsfeld

## Message

```
Fix drag and drop logic in div's mouse handling

* Attach mouse up and mouse move listeners immediately, not just when there
  is already a drag in progress, because when starting a drag, these other
  events may fire before the next frame.
* Remove bounds checks for handling mouse move and mouse events, since a
  dragged object may be moved outside of its original container.

Co-authored-by: Nathan Sobo <nathan@zed.dev>

```

## Parents

- [e6f3731efd6983818dd188bf5d817eac16500e81](https://git.cafe/gitcafe/zed/commit/e6f3731efd6983818dd188bf5d817eac16500e81?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/ee8e1454fcb2edb90fa1ceb10b1f9dd508756327?format=markdown)
