Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

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

Daeksell1469d94683b6
diff --git a/crates/workspace/src/dock.rs b/crates/workspace/src/dock.rs
index 7f4b09df0f9..310ef8133e4 100644
--- a/crates/workspace/src/dock.rs
+++ b/crates/workspace/src/dock.rs
@@ -1037,7 +1037,9 @@ impl Render for PanelButtons {
.anchor(menu_anchor)
.attach(menu_attach)
.trigger(move |is_active, _window, _cx| {
- IconButton::new(name, icon)
+ // Include active state in element ID to invalidate the cached
+ // tooltip when panel state changes (e.g., via keyboard shortcut)
+ IconButton::new((name, is_active_button as u64), icon)
.icon_size(IconSize::Small)
.toggle_state(is_active_button)
.on_click({