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

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

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

Visibility: public

Requested revision: 9a6688bdfb87a38615239a2a05ac4061bf14fdbe

Requested commit: 9a6688bdfb87a38615239a2a05ac4061bf14fdbe

Commit: 9a6688bdfb87a38615239a2a05ac4061bf14fdbe

Tree: 236fbfc1b50b3d3b2cbca72cb3fb34aa1c846a63

Author: Antonio Scandurra

Committer: Antonio Scandurra

## Message

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

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 commit 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).

```

## Parents

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

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