Skip to content

[0.76.4] TextInput issue - TypingAttributes #2312

Open
@gaeldestrem

Description

@gaeldestrem

Environment

react-native -v: 15.0.1
npm ls react-native-macos: : 0.76.4
node -v: 18.20.5
npm -v: 10.8.2
yarn --version: 1.22.1
xcodebuild -version: Xcode 16.1 (Build version 16B40)

Steps to reproduce the bug

I am trying to update my project from 0.75.3 to 0.76.4 as I am really excited about the new Fabric changes that got merged (Thank you for it 🙌).

I encountered the following error when starting :

Error Thread 1: "-[RCTUITextField typingAttributes]: unrecognized selector sent to instance 0x1243e8000"



I managed to reproduce the error with a simple <TextInput value={value} onChangeText={onChangeText} />

By digging into the react-native code, I found that the issues comes the line _originalTypingAttributes = [_backedTextInputView.typingAttributes copy];. The object seems undefined and replacing it by an empty dictionary allows the application to start.

Image

I also found a related issue when typing into the TextInput :

FAULT: NSInvalidArgumentException: -[RCTUITextField setTypingAttributes:]: unrecognized selector sent to instance 0x129a1e320; (user info absent)

Commenting the following code prevents this error: Image

Here is my patch-package (some changes are specific to my project) : react-native-macos+0.76.4.patch

Expected Behavior

No response

Actual Behavior

No response

Reproducible Demo

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions