fix: forward events to trailing element regardless of cursor position

This commit is contained in:
Ashley Wulber 2025-10-08 16:45:59 -04:00
parent 2dda96c07f
commit 58902bf637
No known key found for this signature in database
GPG key ID: 5216D4F46A90A820

View file

@ -876,21 +876,19 @@ where
// Enable custom buttons defined on the trailing icon position to be handled. // Enable custom buttons defined on the trailing icon position to be handled.
if !self.is_editable_variant { if !self.is_editable_variant {
if let Some(trailing_layout) = trailing_icon_layout { 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(
let res = trailing_icon.as_widget_mut().on_event( tree,
tree, event.clone(),
event.clone(), trailing_layout,
trailing_layout, cursor_position,
cursor_position, renderer,
renderer, clipboard,
clipboard, shell,
shell, viewport,
viewport, );
);
if res == event::Status::Captured { if res == event::Status::Captured {
return res; return res;
}
} }
} }
} }