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

[Android] Fix Hover blocking scrolling with mouse wheel #3067

Merged
merged 1 commit into from
Aug 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import android.os.Looper
import android.view.MotionEvent
import android.view.View
import android.view.ViewGroup
import com.swmansion.gesturehandler.react.RNGestureHandlerRootHelper
import com.swmansion.gesturehandler.react.RNViewConfigurationHelper

class HoverGestureHandler : GestureHandler<HoverGestureHandler>() {
Expand Down Expand Up @@ -70,6 +71,10 @@ class HoverGestureHandler : GestureHandler<HoverGestureHandler>() {
return true
}

if (handler is RNGestureHandlerRootHelper.RootViewGestureHandler) {
Copy link
Contributor Author

@m-bert m-bert Aug 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can also specify that pointerType has to be mouse. However, I haven't found any issue with stylus

Suggested change
if (handler is RNGestureHandlerRootHelper.RootViewGestureHandler) {
if (handler is RNGestureHandlerRootHelper.RootViewGestureHandler && pointerType == POINTER_TYPE_MOUSE) {

return true
}

return super.shouldRecognizeSimultaneously(handler)
}

Expand Down
Loading