From 18172f80c96f48cc915b4c8281b9157acaa74b16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20Ram=C3=B3n=20Jim=C3=A9nez?= Date: Thu, 12 Nov 2020 00:47:58 +0100 Subject: [PATCH] Implement event capturing for `Radio` --- native/src/widget/radio.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/native/src/widget/radio.rs b/native/src/widget/radio.rs index 6e74b404..781fffb1 100644 --- a/native/src/widget/radio.rs +++ b/native/src/widget/radio.rs @@ -175,6 +175,8 @@ where Event::Mouse(mouse::Event::ButtonPressed(mouse::Button::Left)) => { if layout.bounds().contains(cursor_position) { messages.push(self.on_click.clone()); + + return event::Status::Captured; } } _ => {}