# Close modals and menus before dispathing actions \(\#7830\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 7c6b34cb73df3f78839a03013f2a796d77b9b839

Requested commit: 7c6b34cb73df3f78839a03013f2a796d77b9b839

Commit: 7c6b34cb73df3f78839a03013f2a796d77b9b839

Tree: bad8f5415a2bd17bc295bcc5a47785fc5e643902

Author: Kirill Bulatov

Committer: GitHub

## Message

```
Close modals and menus before dispathing actions (#7830)

Fixes https://github.com/zed-industries/zed/issues/7799 by forcing the
modal to close before dispatching the action.
While not needed specifically for this case, changed the context menus
to do the same, to be uniform — context menu actions seem to work
properly after this change too.

Release Notes:

- Fixed markdown preview action not working
([7799](https://github.com/zed-industries/zed/issues/7799))
```

## Parents

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

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