# Fix hover tooltips appearing after related element is pressed \(\#24540\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 6f7f0f30e280b0d896668b27b8be62b4c212f9c7

Requested commit: 6f7f0f30e280b0d896668b27b8be62b4c212f9c7

Commit: 6f7f0f30e280b0d896668b27b8be62b4c212f9c7

Tree: b0bb2f54ad4bd275c25bee07e63c5220cd50644e

Author: Kirill Bulatov

Committer: GitHub

## Message

```
Fix hover tooltips appearing after related element is pressed (#24540)

Closes https://github.com/zed-industries/zed/issues/23894

Reworks all trigger declarations from
`.trigger(element.tooltip(tooltip))` into
`.trigger_with_tooltip(element, tooltip)` , with new API disallowing
simultaneous trigger and tooltip display.

All existing `.trigger(` calls were replaced, except 2 not applicable
(in dock.rs and pane.rs), 15 left as ones without tooltips, and 2
unchanged places in `inline_completion_button.rs`, where


https://github.com/zed-industries/zed/blob/0f7bb2e9fd6dc1fe3f0127de19df372f75ad0c4f/crates/inline_completion_button/src/inline_completion_button.rs#L311-L319

`with_animation` does not allow us to simply use the same approach.

Release Notes:

- Fixed hover tooltips appearing after related element is pressed

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
```

## Parents

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

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