Skip to content

Commit 1fafb43

Browse files
authored
[iOS] Fix wrong pointerType in Hover gesture (#3989)
## Description `Hover` gesture events contain wrong pointer type. Normally, we map `UITouchTypePencil` to `RNGestureHandlerStylus`, but `Hover` used unmapped `UITouchTypePencil` instead. Because those enums map to different values (`UITouchTypePencil = 2` & `RNGestureHandlerStylus = 1`), it caused wrong pointer type to be returned. Fixes #3977 ## Test plan Not yet as now I don't have access to iPad 😞
1 parent 1b135f7 commit 1fafb43

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/react-native-gesture-handler/apple/Handlers/RNHoverHandler.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ - (RNGestureHandlerEventExtraData *)eventExtraData:(UIGestureRecognizer *)recogn
157157
{
158158
return [RNGestureHandlerEventExtraData forPosition:[recognizer locationInView:recognizer.view]
159159
withAbsolutePosition:[recognizer locationInView:recognizer.view.window]
160-
withPointerType:UITouchTypePencil];
160+
withPointerType:RNGestureHandlerStylus];
161161
}
162162

163163
@end

0 commit comments

Comments
 (0)