software-mansion / react-native-gesture-handler

Declarative API exposing platform native touch and gesture system to React Native.
https://docs.swmansion.com/react-native-gesture-handler/
MIT License
6.13k stars 982 forks source link

Crash on iOS when setting cursor style #3081

Closed hazelmeow closed 2 months ago

hazelmeow commented 2 months ago

Description

When setting cursor: 'auto' or cursor: 'pointer' in the style of a RectButton, the app crashes with Exception thrown while executing UI block: -[RNGestureHandlerButton setCursor:]: unrecognized selector sent to instance. I don't expect cursor styles to work on mobile but it probably shouldn't crash. I can reproduce the issue on the iOS simulator and on a real iPhone.

Steps to reproduce

Create a RectButton and pass style={{ cursor: 'auto' }}.

Snack or a link to a repository

https://github.com/hazelmeow/rngh-cursor-style-repro

Gesture Handler version

2.16.1

React Native version

0.74.5

Platforms

iOS

JavaScript runtime

None

Workflow

Expo managed workflow

Architecture

None

Build type

None

Device

None

Device model

No response

Acknowledgements

Yes

m-bert commented 2 months ago

Hi @hazelmeow! Could you please check if this PR helps?