fix(segmented_button): fix widget focus not being applied on click
This commit is contained in:
parent
d011be6feb
commit
c955c8400f
1 changed files with 4 additions and 0 deletions
|
|
@ -936,6 +936,8 @@ where
|
||||||
|
|
||||||
if can_activate {
|
if can_activate {
|
||||||
shell.publish(on_activate(key));
|
shell.publish(on_activate(key));
|
||||||
|
state.focused = true;
|
||||||
|
state.focused_item = Item::Tab(key);
|
||||||
state.pressed_item = None;
|
state.pressed_item = None;
|
||||||
return event::Status::Captured;
|
return event::Status::Captured;
|
||||||
}
|
}
|
||||||
|
|
@ -1022,6 +1024,8 @@ where
|
||||||
|
|
||||||
if let Some(key) = activate_key {
|
if let Some(key) = activate_key {
|
||||||
shell.publish(on_activate(key));
|
shell.publish(on_activate(key));
|
||||||
|
state.focused = true;
|
||||||
|
state.focused_item = Item::Tab(key);
|
||||||
return event::Status::Captured;
|
return event::Status::Captured;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue