# Fix pane magnification causing mouse to drag tabs unexpectedly \(\#26383\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 21cf2e38c54873b854ec19279062c3c3dccb451e

Requested commit: 21cf2e38c54873b854ec19279062c3c3dccb451e

Commit: 21cf2e38c54873b854ec19279062c3c3dccb451e

Tree: f6c80dd3ac768fb99ada25cf5c9403aae17759dd

Author: Martim Aires de Sousa

Committer: GitHub

## Message

```
Fix pane magnification causing mouse to drag tabs unexpectedly (#26383)

Previously, if a user clicked a button and moved the cursor out before
releasing, the click event was correctly prevented, but the pending
mouse-down state remained.
This caused unintended drags when the UI shifted due to magnification
settings.

Now, mouse-up clears the pending state:
- If over the button → clear state and trigger click handlers.
- If outside the button → clear state without triggering a click.

This avoids accidental drags while preserving expected click behavior.

Closes #24600

Release Notes:

- N/A

---------

Co-authored-by: Ben Kunkle <ben@zed.dev>
```

## Parents

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

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