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 tooltips sometimes continuously displaying when the button is selected (#14832)

Jason Lee0a0269177885
diff --git a/crates/gpui/src/elements/div.rs b/crates/gpui/src/elements/div.rs
index d9b23296586..6979b58567d 100644
--- a/crates/gpui/src/elements/div.rs
+++ b/crates/gpui/src/elements/div.rs
@@ -1869,6 +1869,11 @@ impl Interactivity {
});
}
+ // Ensure to remove active tooltip if tooltip builder is none
+ if self.tooltip_builder.is_none() {
+ element_state.active_tooltip.take();
+ }
+
if let Some(tooltip_builder) = self.tooltip_builder.take() {
let tooltip_is_hoverable = tooltip_builder.hoverable;
let active_tooltip = element_state