# keymap_ui: Dismiss context menu less frequently \(\#34387\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 0af7d32b7decd0da3729f1c48f2813438ca6de05

Requested commit: 0af7d32b7decd0da3729f1c48f2813438ca6de05

Commit: 0af7d32b7decd0da3729f1c48f2813438ca6de05

Tree: 0adeb859126cb1317f54dd9d6cfe467e83493dcf

Author: Finn Evers

Committer: GitHub

## Message

```
keymap_ui: Dismiss context menu less frequently (#34387)

This PR fixes an issue where the context menu in the keymap UI would be
immediately dismissed after being opened when using a trackpad on MacOS.

Right clicking on MacOS almost always fires a scroll event with a delta
of 0 pixels right after (which is not the case when using a mouse). The
fired scroll event caused the context menu to be removed on the next
frame. This change ensures the menu is only removed when a vertical
scroll is actually happening.

Release Notes:

- N/A
```

## Parents

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

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