fix: gallery item getting stuck #114
Conversation
There was a problem hiding this comment.
Assuming changeset is working correctly, we can revert this to 4.0.0 for this PR
There was a problem hiding this comment.
Hm, weird. Not sure how this changed to lower version. I don't remember manually changing package version to this.
andrewrubin
left a comment
There was a problem hiding this comment.
Thanks for the fix @saugatmalla! I'm not sure we're on the same page with the issue that #112 describes. Maybe it's my mistake, and I wasn't clear with what I was seeing with Sean.
It happens with any device, not even touch screen, where if you start a drag inside the gallery and then move it out, the drag doesn't cancel, see attached. If you think this is an entirely different issue, we can track these two things separately
Screen.Recording.2026-05-06.at.17.20.42.mp4
It looks like these two are separate, I may have mistaken this issue and Sean's issue. This issue seems like we are losing drag outside of the gallery on pointer devices and selecting text. But, lets keep both of the scope in this PR. So, if the pointer was down on gallery and dragging, it should still drag even the pointer moves outside, and snap to the correct position on pointerup anywhere. |
|
Agreed, pointerCapture sounds like a great plan @saugatmalla ! |
|
@andrewrubin I have updated to use |
Description
This fixes the issue in touch devices, when the drag is cancelled by browser's scroll
pan-yand the gallery item gets stuck in weird position.We are adding
pointercancelevent to reset the gallery item.To reproduce, use touch devices and drag the gallery diagonally. It is a little tricky to reproduce.
Attached before and after screen recording - notice that gallery item resets in the After.
Before:
before.mov
After:
after.mov
This fixes #112.