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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix scroll on mouse down being overriden by touch scroll #42

Merged

Conversation

richardhozak
Copy link
Contributor

Fixes unexpected behavior when clicking on scrollbar with mouse, the view would scroll the opposite direction as it would with touch scroll.

This behavior is unexpected with mouse.

The bug was probably caused by Clay_SetPointerState overriding scrollbarData and using the pointer state as scroll information for the container behind the scrollbar instead using the scrollbarData.

This fixes that behavior by not passing mouse down, when mouse down is captured by scrollbar.

Fixes unexpected behavior when clicking on scrollbar with mouse,
the view would scroll the opposite direction as it would with touch scroll.

This behavior is unexpected with mouse.

The bug was probably caused by Clay_SetPointerState overriding scrollbarData
and using the pointer state as scroll information for the container
behind the scrollbar instead using the scrollbarData.

This fixes that behavior by not passing mouse down, when mouse down is captured by scrollbar.
@nicbarker
Copy link
Owner

@richardhozak Hello, and nice catch! Thanks for the fix 🙂

@nicbarker nicbarker merged commit 3b03a79 into nicbarker:main Oct 14, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants