Open alantoa opened 2 months ago
Hey @Saadnajmi, I know that the cursor prop feature is your contribution, and thank you for your great PR!
I understand that maybe it is unnecessary to set it for Text
in VisionOS, but sometimes we need to use it for RN Web. So I'm wondering if we can just ignore this prop on Text
instead of throwing an error?
EDIT: Fix onto main, which I guess can be picked if it lands? https://github.com/facebook/react-native/pull/44563
Ah yeah this is a legitimate bug. We should either allow you to set cursor
on Text, or filter it out (presumably by not including it in Text's ViewConfig). I can look into what works in a bit.
Initial testing, this only reproes on the old architecture.
Description
I have noticed that when I set the
cursor: 'pointer'
for theText
component, the app breaks, although it works well forView
.https://github.com/facebook/react-native/assets/37520667/46f7f6dd-d33f-42cd-b832-e81e9d0a859f
Steps to reproduce
Set the
cursor: 'pointer'
style prop for theText
component inreact-native
.React Native Version
0.74.1
Affected Platforms
Runtime - iOS
Output of
npx react-native info
Stacktrace or Logs
Reproducer
https://snack.expo.dev/@alantoa/cursor-prop-is-causing-crash-on-text
Screenshots and Videos
https://github.com/facebook/react-native/assets/37520667/46f7f6dd-d33f-42cd-b832-e81e9d0a859f