# Calculate hitbox based on visible bounds in \`\{Mouse\}EventHandler\` · gitcafe/zed

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

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

Visibility: public

Requested revision: b3969090352d9882f44fd00dcbe8da30a63ed32f

Requested commit: b3969090352d9882f44fd00dcbe8da30a63ed32f

Commit: b3969090352d9882f44fd00dcbe8da30a63ed32f

Tree: 90b3da18dded664f813cb5b8923ae938e6e0610b

Author: Antonio Scandurra

Committer: Antonio Scandurra

## Message

```
Calculate hitbox based on visible bounds in `{Mouse}EventHandler`

This is in contrast to not dispatching the event altogether in `Flex` when
the event is not contained in the flex element bounds. That approach was
problematic because it didn't give an opportunity to `MouseEventHandler`s
to handle mouse move events when they didn't intersect with the element bounds,
causing elements to never clear their hover state, cursor style, etc.

```

## Parents

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

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