# Fix panic when deploying emoji picker \(character palette\) \(\#3790\) · gitcafe/zed

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

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

Visibility: public

Requested revision: c34a81152f7eebdca1e11906bf938389b12462aa

Requested commit: c34a81152f7eebdca1e11906bf938389b12462aa

Commit: c34a81152f7eebdca1e11906bf938389b12462aa

Tree: 5afb56eb6235ae188601918fc6d9b8199816699f

Author: Antonio Scandurra

Committer: GitHub

## Message

```
Fix panic when deploying emoji picker (character palette) (#3790)

The panic was caused by Cocoa synchronously invoking the
`selected_text_range` method on the registered input handler while we
already had a borrow of the app.

This pull request fixes this issue by showing the character palette on
the next tick of the loop (we've had this problem in other spots too and
used the same technique).

Release Notes:

- N/A
```

## Parents

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

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

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