Skip to content

[android] fix scroll actions interpreted as touch#3850

Merged
j-piasecki merged 1 commit into
software-mansion:mainfrom
discord:@kosmydel/fix-scroll
Dec 1, 2025
Merged

[android] fix scroll actions interpreted as touch#3850
j-piasecki merged 1 commit into
software-mansion:mainfrom
discord:@kosmydel/fix-scroll

Conversation

@kosmydel

@kosmydel kosmydel commented Nov 28, 2025

Copy link
Copy Markdown
Contributor

Description

The scroll action on the Meta Quest Joystick lead to triggering the Pan gesture when it shouldn't. This PR filters out this ACTION_SCROLL by applying whitelist in the dispatchGenericMotionEvent for the hover events only.

@kosmydel kosmydel force-pushed the @kosmydel/fix-scroll branch from f301097 to 71dbcd7 Compare November 28, 2025 14:29
@kosmydel kosmydel force-pushed the @kosmydel/fix-scroll branch from 71dbcd7 to e7fa78a Compare November 28, 2025 16:05
@kosmydel kosmydel marked this pull request as ready for review November 28, 2025 16:07

@j-piasecki j-piasecki 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.

Thanks ❤️!

@j-piasecki j-piasecki merged commit 2357469 into software-mansion:main Dec 1, 2025
4 checks passed
m-bert pushed a commit that referenced this pull request Dec 16, 2025
The scroll action on the Meta Quest Joystick lead to triggering the Pan
gesture when it shouldn't. This PR filters out this `ACTION_SCROLL` by
applying whitelist in the `dispatchGenericMotionEvent` for the hover
events only.
m-bert added a commit that referenced this pull request Jun 16, 2026
## Description

#3850 restricted dispatching of generic motion events to only hover
events. This caused a regression in which mouse events stopped being
dispatched to handlers.

This PR allows mouse events to be dispatched to handlers and adds check
for mouse button press in Long Press so it can activate timeout.

It also removes check for obsolete SDK version and inverts logic of
skipping events - `shouldActivateWithMouse` wasn't very descriptive
(especially in `onHandle`), so I renamed it to `shouldSkipEvent`
instead.

Fixes #3889 

## Test plan

Tested on mouse buttons and Pressable examples
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