`bevy_core_widget`'s core_slider doesn't snap to the cursor position on pointer press if the pointer is also moving
- Dominant language
- Rust
- Stars
- 48.2k
- Forks
- 4.8k
- Avg merge
- 3d 22h
- Merged PRs (30d)
- 161
Description
## Bevy version and features
`955e024a3828047382c4595970546bf3dc28316e`, and `experimental_bevy_feathers`
## \[Optional\] Relevant system information
- Arch Linux, Wayland (sway)
## What you did
`cargo run --example=feathers --features=experimental_bevy_feathers`
Drag the color sliders around while moving the mouse
## What went wrong
the thumb lagged behind or in front of the pointer while dragging.
I expected the thumb to snap to the pointer position, then move with the pointer while dragging.
## Additional information
Because the `slider_on_pointer_down` calls the callback with the current frame, but `slider_on_drag_start` stores the old value and then the callback is called by `slider_on_drag` based on that value.
also visible here is that while the color updates immediately when the slider is clicked, the slider itself only updates on the next winit event because the `update_slider_pos` observer doesn't get triggered.
https://github.com/user-attachments/assets/6e223c37-f28a-4d72-9d54-cd32637225d4
Contributor guide
Assessment
This issue has not been assessed yet.