Fix for extra click event

This commit is contained in:
Jason Rodney Hansen 2024-05-26 19:49:46 -06:00 committed by Jeremy Soller
parent cf47297866
commit 8351678822

View file

@ -474,9 +474,7 @@ fn update<Message: Clone>(
state.drag_initiated = cursor.position();
}
if let Some(message) = widget.on_press.as_ref() {
shell.publish(message(cursor.position_in(layout_bounds)));
if widget.on_press.is_some() {
return event::Status::Captured;
}
}