![]() # Objective - `AutoFocus` component does seem to work with the `set_initial_focus` that was running in `Startup`. - If an element is spawn during `PreStartup` or during `OnEnter(SomeState)` that happens before `Startup`, the focus is overridden by `set_initial_focus` which sets the focus to the primary window. ## Solution - `set_initial_focus` only sets the focus to the `PrimaryWindow` if no other focus is set. - *Note*: `cargo test --package bevy_input_focus` was not working, so some changes are related to that. ## Testing - `cargo test --package bevy_input_focus`: OK - `cargo run --package ci`: OK |
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
LICENSE-APACHE | ||
LICENSE-MIT | ||
README.md |