From f17cd2928a37a09bfce70f4ef1d775eebe138cf0 Mon Sep 17 00:00:00 2001 From: Ashley Wulber Date: Wed, 8 Oct 2025 16:45:59 -0400 Subject: [PATCH] fix: forward events to trailing element regardless of cursor position --- src/widget/text_input/input.rs | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/src/widget/text_input/input.rs b/src/widget/text_input/input.rs index fb88913..949f204 100644 --- a/src/widget/text_input/input.rs +++ b/src/widget/text_input/input.rs @@ -876,21 +876,19 @@ where // Enable custom buttons defined on the trailing icon position to be handled. if !self.is_editable_variant { if let Some(trailing_layout) = trailing_icon_layout { - if cursor_position.is_over(trailing_layout.bounds()) { - let res = trailing_icon.as_widget_mut().on_event( - tree, - event.clone(), - trailing_layout, - cursor_position, - renderer, - clipboard, - shell, - viewport, - ); + let res = trailing_icon.as_widget_mut().on_event( + tree, + event.clone(), + trailing_layout, + cursor_position, + renderer, + clipboard, + shell, + viewport, + ); - if res == event::Status::Captured { - return res; - } + if res == event::Status::Captured { + return res; } } }