Improve `View::take_focus` behaviour with mouse events.
Open
- Dominant language
- Rust
- Stars
- 4.8k
- Forks
- 270
- Avg merge
- 5d 19h
- Merged PRs (30d)
- 2
Description
When `take_focus` is caused by a mouse event, `source = Direction::none()` may not be enough to decide whether to take the focus or now.
Example: a `LinearLayout` with two children, only one of them focusable. If a mouse click falls on the non-focusable child, should the LinearLayout take focus? And transmit it to the other, focusable child?
One solution for that is to add a new type of absolute direction: maybe `Absolute::Target(Vec2)`, used for focus caused by mouse events. Or maybe give `Absolute::None` an `Option` target?
Contributor guide
Assessment
This issue has not been assessed yet.