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

TextInput with multiline not triggering onChangeText callback in 0.71.2 #1788

Closed
k1mmm opened this issue Apr 12, 2023 · 17 comments · Fixed by #1811
Closed

TextInput with multiline not triggering onChangeText callback in 0.71.2 #1788

k1mmm opened this issue Apr 12, 2023 · 17 comments · Fixed by #1811
Labels
bug Something isn't working
Milestone

Comments

@k1mmm
Copy link

k1mmm commented Apr 12, 2023

Environment

react-native -v: 0.71.6
npm ls react-native-macos: 0.71.2

Steps to reproduce the bug

<TextInput multiline onChangeText={(text) => console.log(text)} />

Additional context

Works perfectly without 'multiline' prop

@k1mmm k1mmm added the bug Something isn't working label Apr 12, 2023
@Saadnajmi Saadnajmi changed the title TextInput with multiline not triggering onChangeText callback in 0.72.2 TextInput with multiline not triggering onChangeText callback in 0.71.2 Apr 12, 2023
@Saadnajmi
Copy link
Collaborator

@shwanton FYI

@Saadnajmi
Copy link
Collaborator

It seems others have hit this too, and it seems pretty bad. We'll try to take a look at it and find a fix.

@k1mmm
Copy link
Author

k1mmm commented Apr 13, 2023

@Saadnajmi Awesome thanks! Can't wait to use 0.71, especially with that smooth content resizing =)

@shwanton
Copy link

Looks like TextInput onChangeText has issues w/ Paper on 0.71
facebook#36494

@k1mmm
Copy link
Author

k1mmm commented Apr 19, 2023

@shwanton this seem to be resolved now in the upstream repo
facebook@a804c0f

@Saadnajmi
Copy link
Collaborator

@shwanton this seem to be resolved now in the upstream repo
facebook@a804c0f

Looks like it should be picked for a future patch release, at which point we can merge it into our repo as well.
reactwg/react-native-releases#61 (reply in thread)

@k1mmm
Copy link
Author

k1mmm commented Apr 23, 2023

@Saadnajmi is there anyway we can confirm this will fix the issue before we wait around for the patch?

@Saadnajmi
Copy link
Collaborator

@k1mmm if you fork React Native macOS internally, you could try cherry picking the one commit.

Since RN 0.71.7 was just released, and 0.71.8 right now only has that one commit in it's pick requests, I'll consider just cherry-picking it along with all the 0.71.7 commits for React Native macOS. I'll update in this thread if we end up doing that.

@Saadnajmi Saadnajmi added this to the 0.71 milestone Apr 25, 2023
@Saadnajmi
Copy link
Collaborator

I just tested cherry-picking that commit, and it doesn't seem to fix the issue :/
We'll have to keep debugging

@k1mmm
Copy link
Author

k1mmm commented Apr 26, 2023

@Saadnajmi Oh, that's unfortunate. Alright, thanks for the effort and the update!

@k1mmm
Copy link
Author

k1mmm commented May 3, 2023

@Saadnajmi Just wanna let you know onSubmitEditing do not work either on textInputs regarding being multiline or not

@Saadnajmi
Copy link
Collaborator

@k1mmm What key are you using got submit? And have you set the submitKeyEvents prop? For context, here's the logic:

- (void)submitOnKeyDownIfNeeded:(NSEvent *)event

@shwanton
Copy link

shwanton commented May 3, 2023

facebook#33653 Changed this api and we need to update the RCTBackedTextFieldDelegateAdapter on macOS to use textInputShouldSubmitOnReturn instead.

Fix incoming.

@Saadnajmi
Copy link
Collaborator

Reopening till we backport to 0.71-stable

@k1mmm
Copy link
Author

k1mmm commented May 4, 2023

@k1mmm What key are you using got submit? And have you set the submitKeyEvents prop? For context, here's the logic:

- (void)submitOnKeyDownIfNeeded:(NSEvent *)event

I'm using Enter key with nothing else, this used to work in 0.69 @Saadnajmi

@shwanton
Copy link

shwanton commented May 4, 2023

Fix was picked to 0.71-stable: #1812

@k1mmm
Copy link
Author

k1mmm commented May 4, 2023

Its working flawless now! Thanks allot!

@k1mmm k1mmm closed this as completed May 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants