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

<Text onBlur={() => {}}> throws -[RCTTextView setOnBlur:]: unrecognized selector sent #2090

Open
thejustinwalsh opened this issue Mar 7, 2024 · 1 comment
Labels
bug Something isn't working Needs: Triage 🔍

Comments

@thejustinwalsh
Copy link

Environment

react-native -v: 12.3.2
npm ls react-native-macos: react-native-macos@0.73.17
node -v: v18.15.0
npm -v: 9.7.2
yarn --version: 1.22.21
xcodebuild -version: Xcode 15.3 Build version 15E204a

Steps to reproduce the bug

Add a Text component with an onBlur event handler...

<Text onBlur={() => {}}>

Expected Behavior

This component is valid on react-native for iOS / Andoird / Expo and does not throw an exception.

Actual Behavior

On react-native-macos, the following exception is thrown...

Exception thrown while executing UI block: -[RCTTextView setOnBlur:]: unrecognized selector sent to instance 0x11e4a34f0

__44-[RCTUIManager flushUIBlocksWithCompletion:]_block_invoke
    RCTUIManager.m:1265
__44-[RCTUIManager flushUIBlocksWithCompletion:]_block_invoke.189
__RCTExecuteOnMainQueue_block_invoke
_dispatch_call_block_and_release
_dispatch_client_callout
_dispatch_main_queue_drain
_dispatch_main_queue_callback_4CF
__CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__
__CFRunLoopRun
CFRunLoopRunSpecific
RunCurrentEventLoopInMode
ReceiveNextEventCommon
_BlockUntilNextEventMatchingListInModeWithFilter
_DPSNextEvent
-[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:]
-[NSApplication run]
NSApplicationMain
main
start

This was discovered when attempting to use https://github.com/tamagui/tamagui on react-native-macos

Reproducible Demo

https://snack.expo.dev/@thejustinwalsh/text-on-blur

Additional context

No response

@thejustinwalsh thejustinwalsh added the bug Something isn't working label Mar 7, 2024
@Saadnajmi
Copy link
Collaborator

Thanks for the report! Interesting..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Needs: Triage 🔍
Projects
None yet
Development

No branches or pull requests

2 participants