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

Implement [RCTUITextField selectedRange] #2115

Merged
merged 1 commit into from
Apr 25, 2024

Conversation

Saadnajmi
Copy link
Collaborator

@Saadnajmi Saadnajmi commented Apr 25, 2024

Summary:

We have a crash internally due to the following error:

uncaught ObjC exception, reason: -[RCTUITextField selectedRange]: unrecognized selector sent to instance 0x347fc2d70

This reproes when you move focus programmatically (I.E: through JS with ref.current.focus()) to a TextInput with 2-Set Korean text already typed. For some reason, that exact code path means that Appkit calls the selector on our TextInput (backed by RCTUITextField in natively) and we crash on the uncaught exception.

Fix is to implement the selector.

Test Plan:

CI should pass. Locally, no longer get an unrecognized selector exception.

@Saadnajmi Saadnajmi enabled auto-merge (squash) April 25, 2024 22:16
@Saadnajmi Saadnajmi merged commit 9bf4f6e into microsoft:main Apr 25, 2024
18 checks passed
@Saadnajmi Saadnajmi deleted the textinput branch April 26, 2024 00:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants