Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix drag drop update outside scroll container #113

Conversation

mat007
Copy link
Contributor

@mat007 mat007 commented Dec 29, 2023

This PR comes on top of #107, #108, and only the last commit is new.
Sorry about that, I tried to make small easier to review PRs, but at this point it鈥檚 become hard to keep them all separate 馃槵

I鈥檒l rebase this PR if/when the other PRs are merged, if that makes it easier to review.

Applying this patch to the scrollcontainer example exposes the following problem: the update and end callbacks are triggered with an element match on a widget that鈥檚 outside the scroll container.
This is shown in the following video where we press one of the buttons, then drag around outside the scroll viewport: the bug is the update drag true at the end.

drag-hidden-widget-bis

There is already an update triggered right after, with the correct data e.g. the hovered element. This extra update was always done with droppable false and no element.
No need to create args unless we鈥檙e really using it.
@mat007 mat007 force-pushed the fix-drag-drop-update-outside-scroll-container branch from a2d2558 to 1bfa0f6 Compare March 11, 2024 19:54
@mcarpenter622 mcarpenter622 merged commit 752494b into ebitenui:master Mar 19, 2024
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants