Skip to content

Fix(input focus): Bypass change detection in process_recorded_focus_changes#23765

Merged
alice-i-cecile merged 3 commits intobevyengine:mainfrom
kfc35:23759_input_focus_change_detection
Apr 12, 2026
Merged

Fix(input focus): Bypass change detection in process_recorded_focus_changes#23765
alice-i-cecile merged 3 commits intobevyengine:mainfrom
kfc35:23759_input_focus_change_detection

Conversation

@kfc35
Copy link
Copy Markdown
Contributor

@kfc35 kfc35 commented Apr 12, 2026

Objective

Solution

  • Bypass change detection whenever ResMut<InputFocus> is accessed in process_recorded_focus_changes.

Testing

  • cargo run --example feathers --features=“experimental_bevy_feathers”: text cursor now blinks correctly again
  • cargo run --example directional_navigation verified via println! statement in update_focus_display that the system isn’t running on every frame (since it has a run condition .run_if(|input_focus: Res<InputFocus>| input_focus.is_changed()))

@kfc35 kfc35 requested a review from alice-i-cecile April 12, 2026 03:25
@kfc35 kfc35 added C-Bug An unexpected or incorrect behavior A-UI Graphical user interfaces, styles, layouts, and widgets P-Regression Functionality that used to work but no longer does. Add a test for this! D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Apr 12, 2026
@github-project-automation github-project-automation bot moved this to Needs SME Triage in UI Apr 12, 2026
@kfc35 kfc35 added this to the 0.19 milestone Apr 12, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Your PR caused a change in the graphical output of an example or rendering test. This might be intentional, but it could also mean that something broke!
You can review it at https://pixel-eagle.com/project/B04F67C0-C054-4A6F-92EC-F599FEC2FD1D?filter=PR-23765

If it's expected, please add the M-Deliberate-Rendering-Change label.

If this change seems unrelated to your PR, you can consider updating your PR to target the latest main branch, either by rebasing or merging main into it.

@kfc35
Copy link
Copy Markdown
Contributor Author

kfc35 commented Apr 12, 2026

Strange, there seems to have been an error uploading the screenshots and that’s why the pixel-eagle comment is there:
https://github.com/bevyengine/bevy/actions/runs/24297815059/job/70945786727
"jq: parse error: Invalid numeric literal at line 1, column 10”

Anyway, it can probably be ignored?

@alice-i-cecile
Copy link
Copy Markdown
Member

Aha, that's why!

Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
@bevyengine bevyengine deleted a comment from github-actions bot Apr 12, 2026
@bevyengine bevyengine deleted a comment from github-actions bot Apr 12, 2026
@JMS55 JMS55 added S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it and removed S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Apr 12, 2026
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Apr 12, 2026
Merged via the queue into bevyengine:main with commit b4bb52c Apr 12, 2026
40 checks passed
@github-project-automation github-project-automation bot moved this from Needs SME Triage to Done in UI Apr 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-UI Graphical user interfaces, styles, layouts, and widgets C-Bug An unexpected or incorrect behavior D-Straightforward Simple bug fixes and API improvements, docs, test and examples P-Regression Functionality that used to work but no longer does. Add a test for this! S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

New FocusGained and FocusLost caused text cursor to stop blinking

3 participants