Skip to content

Fix slider pointer capture - #25772

Merged
alice-i-cecile merged 2 commits into
bevyengine:mainfrom
moosama76:fix-slider-pointer-capture
Sep 15, 2026
Merged

alice-i-cecile merged 2 commits into
bevyengine:mainfrom
moosama76:fix-slider-pointer-capture

Conversation

@moosama76

@moosama76 moosama76 commented Sep 13, 2026 •

Copy link
Copy Markdown
Contributor

Objective

Solution

  • Capture the pointer when a slider receives PointerDragStart.
  • Release the pointer when the drag ends.
  • Added a regression test verifying that the slider captures the pointer on drag start.

Testing

  • Ran the focused slider pointer-capture test successfully.
  • Ran the full bevy_ui_widgets test suite successfully with cargo test -p bevy_ui_widgets.
  • Ran git diff --check successfully.
  • No platform-specific behavior is expected from this change.

AI disclosure

I used an LLM only as a final code reviewer to improve any non rust-idiomatic code

@alice-i-cecile alice-i-cecile added A-UI Graphical user interfaces, styles, layouts, and widgets X-Uncontroversial This work is generally agreed upon D-Straightforward Simple bug fixes and API improvements, docs, test and examples C-Refinement Improves output quality, without fixing a clear bug or adding new functionality. labels Sep 14, 2026
@github-project-automation github-project-automation Bot moved this to Needs SME Triage in UI Sep 14, 2026
@alice-i-cecile alice-i-cecile added the S-Needs-Review Needs reviewer attention (from anyone!) to move forward label Sep 14, 2026

@viridia viridia left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems fine - @alice-i-cecile Would this also fall under your "low value test" criteria?

@viridia

viridia commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Also, needs an LLM disclosure in the description.

@alice-i-cecile alice-i-cecile added S-Waiting-on-Author The author needs to make changes or address concerns before this can be merged and removed S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Sep 14, 2026

@alice-i-cecile alice-i-cecile left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is relatively high value as a test: there's more complex logic here that could plausibly be broken.

This doesn't smell particularly AI-generated to me, but yes, AI disclosure is required.

@alice-i-cecile alice-i-cecile 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-Waiting-on-Author The author needs to make changes or address concerns before this can be merged labels Sep 14, 2026
@alice-i-cecile
alice-i-cecile added this pull request to the merge queue Sep 14, 2026
@alice-i-cecile
alice-i-cecile removed this pull request from the merge queue due to a manual request Sep 14, 2026
@moosama76

Copy link
Copy Markdown
Contributor Author

This is relatively high value as a test: there's more complex logic here that could plausibly be broken.

This doesn't smell particularly AI-generated to me, but yes, AI disclosure is required.

I added LLM disclosure

@alice-i-cecile
alice-i-cecile added this pull request to the merge queue Sep 15, 2026
Merged via the queue into bevyengine:main with commit 88290c3 Sep 15, 2026
52 checks passed
@github-project-automation github-project-automation Bot moved this from Needs SME Triage to Done in UI Sep 15, 2026
gregcsokas pushed a commit to gregcsokas/bevy that referenced this pull request Sep 21, 2026
## Objective

* Make sliders capture the pointer when dragging, so dragging continues
correctly even when the pointer moves outside the slider's hit area.
* Fixes bevyengine#25705.

## Solution

* Capture the pointer when a slider receives `PointerDragStart`.
* Release the pointer when the drag ends.
* Added a regression test verifying that the slider captures the pointer
on drag start.

## Testing

* Ran the focused slider pointer-capture test successfully.
* Ran the full `bevy_ui_widgets` test suite successfully with `cargo
test -p bevy_ui_widgets`.
* Ran `git diff --check` successfully.
* No platform-specific behavior is expected from this change.

## AI disclosure

I used an LLM only as a final code reviewer to improve any non
rust-idiomatic code
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-Refinement Improves output quality, without fixing a clear bug or adding new functionality. D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it X-Uncontroversial This work is generally agreed upon

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Update slider / scrollbar / number_input to use pointer capture

3 participants