fix(segmented_button): fix widget focus not being applied on click

This commit is contained in:
Michael Aaron Murphy 2025-03-24 04:36:53 +01:00
parent d011be6feb
commit c955c8400f
No known key found for this signature in database
GPG key ID: B2732D4240C9212C

View file

@ -936,6 +936,8 @@ where
if can_activate {
shell.publish(on_activate(key));
state.focused = true;
state.focused_item = Item::Tab(key);
state.pressed_item = None;
return event::Status::Captured;
}
@ -1022,6 +1024,8 @@ where
if let Some(key) = activate_key {
shell.publish(on_activate(key));
state.focused = true;
state.focused_item = Item::Tab(key);
return event::Status::Captured;
}
}