From 530f5075d0c1e1084a27ab6705bfe3458c9d8e72 Mon Sep 17 00:00:00 2001 From: Danilo Leal <67129314+danilo-leal@users.noreply.github.com> Date: Fri, 8 Aug 2025 15:34:25 -0300 Subject: [PATCH] ui: Fix switch field info tooltip (#35882) Passing an empty on_click handler so that clicking on the info icon doesn't actually trigger the switch itself, which happens if you click anywhere in the general switch field surface area. Release Notes: - N/A --- crates/ui/src/components/toggle.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/ui/src/components/toggle.rs b/crates/ui/src/components/toggle.rs index 4b985fd2c2..59c056859d 100644 --- a/crates/ui/src/components/toggle.rs +++ b/crates/ui/src/components/toggle.rs @@ -659,10 +659,12 @@ impl RenderOnce for SwitchField { .icon_size(IconSize::XSmall) .icon_color(Color::Muted) .shape(crate::IconButtonShape::Square) + .style(ButtonStyle::Transparent) .tooltip({ let tooltip = tooltip_fn.clone(); move |window, cx| tooltip(window, cx) - }), + }) + .on_click(|_, _, _| {}), // Intentional empty on click handler so that clicking on the info tooltip icon doesn't trigger the switch toggle ) });