# Fix dock panel button tooltip not dismissed when state changes via keyboard shortcut \(\#44746\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 1469d94683b6f2ef54d7a98dff8e14be1d244061

Requested commit: 1469d94683b6f2ef54d7a98dff8e14be1d244061

Commit: 1469d94683b6f2ef54d7a98dff8e14be1d244061

Tree: 2c4f13a23307262ef922ec7d52984ad43a7b0110

Author: Daeksell

Committer: GitHub

## Message

```
Fix dock panel button tooltip not dismissed when state changes via keyboard shortcut (#44746)

Closes #44720

Release Notes:

- Fixed dock panel button tooltips not being dismissed when toggling
panels via keyboard shortcut




**Problem:** When hovering over a dock panel button and using a keyboard
shortcut to toggle the panel, the tooltip remains visible with stale
content. This is inconsistent with mouse click behavior, where the
tooltip is dismissed on mouse down.

**Solution:** Include the panel's active state in the button's element
ID. When the state changes, the element ID changes (e.g., `"DebugPanel"`
→ `"DebugPanel-active"`), which causes GPUI to discard the old element
state including the cached tooltip.

**Testing:** Manually verified:
1. Hover over a dock panel button, wait for tooltip
2. Press keyboard shortcut to toggle the panel
3. Tooltip is now dismissed (consistent with mouse click behavior)


https://github.com/user-attachments/assets/ed92fb6c-6c22-44e2-87e3-5461d35f7106

---------

Co-authored-by: MrSubidubi <finn@zed.dev>
```

## Parents

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

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