-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Open
Labels
Platform: iOSThis issue is specific to iOSThis issue is specific to iOSRepro providedA reproduction with a snack or repo is providedA reproduction with a snack or repo is provided
Description
Description
The hover gesture reports the wrong type of pointer.
The eventExtraData method of the hover handler uses UITouchTypePencil instead of the RNGH internal RNGestureHandlerStylus, which causes the enum mapping to become MOUSE instead.
The same method also causes the pointer type to be reported as the same, whether using a stylus or a mouse. There doesn't seem to be a clear way of separating the types on iOS, but checking if zOffset property of UIHoverGestureRecognizer is > 0 might suffice?
Steps to reproduce
- Open Snack reproducer on an iOS device capable of stylus hover.
- Hover salmon coloured square with Stylus (e.g. Apple Pencil Pro).
- Tap the same area with the same Stylus.
- Notice Tap Pointer Type label indicates STYLUS, while Hover Pointer Type indicates MOUSE.
A link to a Gist, an Expo Snack or a link to a repository based on this template that reproduces the bug.
https://snack.expo.dev/@andreashogstromnavigraph/rngh-hover-pointertype
Gesture Handler version
2.29.0
React Native version
0.83.0
Platforms
iOS
JavaScript runtime
Hermes
Workflow
React Native (without Expo)
Architecture
New Architecture (Fabric)
Build type
None
Device
Real device
Device model
iPad Pro 13-inch (M4)
Acknowledgements
Yes
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Platform: iOSThis issue is specific to iOSThis issue is specific to iOSRepro providedA reproduction with a snack or repo is providedA reproduction with a snack or repo is provided