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.

Merge branch 'main' into collab-ui-refinement

Nate Butler88188b0c309d
diff --cc crates/ui2/src/components/button/button_like.rs
index 6885ac86e16,207d59ecf15..29864a895d2
--- a/crates/ui2/src/components/button/button_like.rs
+++ b/crates/ui2/src/components/button/button_like.rs
@@@ -258,14 -262,15 +262,19 @@@ impl RenderOnce for ButtonLike
.active(|active| active.bg(self.style.active(cx).background))
.when_some(
self.on_click.filter(|_| !self.disabled),
- |this, on_click| this.on_click(move |event, cx| (on_click)(event, cx)),
+ |this, on_click| {
+ this.on_click(move |event, cx| {
+ cx.stop_propagation();
+ (on_click)(event, cx)
+ })
+ },
)
.when_some(self.tooltip, |this, tooltip| {
- this.tooltip(move |cx| tooltip(cx))
+ if !self.selected {
+ this.tooltip(move |cx| tooltip(cx))
+ } else {
+ this
+ }
})
.children(self.children)
}