Skip to main content

focus_direction

Function focus_direction 

Source
pub fn focus_direction<T>(direction: FocusDirection) -> Task<T>
Expand description

Focuses the nearest focusable widget in the given spatial FocusDirection.

Uses widget bounds to determine the closest candidate. If nothing is focused, the first focusable widget receives focus. Wraps to the opposite edge when no candidate exists in the requested direction.