bevy/crates/bevy_input_focus/src
Talin 4ff595a4bc
New simplified "click to focus" logic for core widgets. (#19736)
Click to focus is now a global observer.

# Objective

Previously, the "click to focus" behavior was implemented in each
individual headless widget, producing redundant logic.

## Solution

The new scheme is to have a global observer which looks for pointer down
events and triggers an `AcquireFocus` event on the target. This event
bubbles until it finds an entity with `TabIndex`, and then focuses it.

## Testing

Tested the changes using the various examples that have focusable
widgets. (This will become easier to test when I add focus ring support
to the examples, but that's for another day. For now you just have to
know which keys to press.)

## Migration

This change is backwards-compatible. People who want the new behavior
will need to install the new plugin.
2025-06-21 18:05:26 +00:00
..
autofocus.rs Component lifecycle reorganization and documentation (#19543) 2025-06-10 00:59:16 +00:00
directional_navigation.rs reexport entity set collections in entity module (#18413) 2025-03-30 03:51:14 +00:00
lib.rs New simplified "click to focus" logic for core widgets. (#19736) 2025-06-21 18:05:26 +00:00
tab_navigation.rs New simplified "click to focus" logic for core widgets. (#19736) 2025-06-21 18:05:26 +00:00