-
Notifications
You must be signed in to change notification settings - Fork 7
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
[0.76] Fix cursor moving while typing quickly and autocorrection triggered in controlled single line TextInput on iOS (New Arch) #595
Comments
Unfortunately after some testing it seems that the aforementioned issues are not fixed by this patch, though it is still likely worth pulling in. |
We might also need facebook/react-native@557e344 |
Holding on this for 0.76.1, waiting for a reproducer. |
Here is a repro with both patches applied: https://github.com/mhoran/new-arch-autocorrect-repro. I am in fact able to reproduce all of the issues that were reportedly fixed with facebook/react-native#46970 -- so perhaps the fix is incomplete.
Perhaps there's another missing patch? |
Let me take a look at these, to see if something might have broke since the initial iteration of the change and what was merged. I'm also seeing this not fixed, which wasn't the case earlier. Once that is settled, I do think we should pick the collection of changes. I was holding out until this week, since as of this Wednesday, the change will have been in major production apps for about a week. |
… value specified using `value` instead of `children` Summary: There were [reports](reactwg/react-native-releases#595) that patching in the fixes for iOS controlled input did not work as expected. I think tracked this down to a difference in how I tested, where the controlled component I used passed value as a child of the `TextInput`, instead of via `value`. Passing via `value` triggers a secondary bug, where we don't correctly pass a reference to correct ShadowView when creating attributedstring, specifically in the iOS TextInputShadowNode impl. This was first exposed in D52589303 which enabled `-Wextra`, but there, we went with same behavior of passing empty ShadowView, instead of the correct behavior (like Android impl) of passing a ShadowView of the current ShadowNode. After fixing this, we now correctly create event emitters in the passed attributedstring, which matches expectations for pargraph-level eventemitter now in typing attributes. We don't seem actually use this on iOS for TextInput right now (just Text), but this is likely the right foundation for events regardless. Changelog: [iOS][Fixed] - Fix missing event emitters on iOS TextInput when controlled component value specified using `value` instead of `children` Differential Revision: D65108163
@mhoran I think I tracked this down. Would you be able to try also applying the change in facebook/react-native#47269 ? The gist is that, the controlled component I used in testing accepted |
facebook/react-native#47269 works for me! All the issues mentioned in #595 (comment) are resolved with the three patches discussed: Thanks for taking a look at this so quickly! |
…nent value specified using `value` instead of `children` (facebook#47269) Summary: There were [reports](reactwg/react-native-releases#595) that patching in the fixes for iOS controlled input did not work as expected. I think tracked this down to a difference in how I tested, where the controlled component I used passed value as a child of the `TextInput`, instead of via `value`. Passing via `value` triggers a secondary bug, where we don't correctly pass a reference to correct ShadowView when creating attributedstring, specifically in the iOS TextInputShadowNode impl. We previously passed nothing for the ShadowView (only the first two struct fields). This was exposed in D52589303 which enabled `-Wextra`, but there, I went with same behavior of passing empty ShadowView, instead of the correct behavior (like Android impl) of passing a ShadowView of the current ShadowNode. After fixing this, we now correctly create event emitters in the passed attributedstring, which matches expectations for pargraph-level eventemitter now in typing attributes. We don't seem actually use this on iOS for TextInput right now (just Text), but this is likely the right foundation for events regardless. Changelog: [iOS][Fixed] - Fix missing emitter attributes on iOS TextInput when controlled component value specified using `value` instead of `children` Differential Revision: D65108163
…nent value specified using `value` instead of `children` (#47269) Summary: Pull Request resolved: #47269 There were [reports](reactwg/react-native-releases#595) that patching in the fixes for iOS controlled input did not work as expected. I think tracked this down to a difference in how I tested, where the controlled component I used passed value as a child of the `TextInput`, instead of via `value`. Passing via `value` triggers a secondary bug, where we don't correctly pass a reference to correct ShadowView when creating attributedstring, specifically in the iOS TextInputShadowNode impl. We previously passed nothing for the ShadowView (only the first two struct fields). This was exposed in D52589303 which enabled `-Wextra`, but there, I went with same behavior of passing empty ShadowView, instead of the correct behavior (like Android impl) of passing a ShadowView of the current ShadowNode. After fixing this, we now correctly create event emitters in the passed attributedstring, which matches expectations for pargraph-level eventemitter now in typing attributes. We don't seem actually use this on iOS for TextInput right now (just Text), but this is likely the right foundation for events regardless. Changelog: [iOS][Fixed] - Fix missing emitter attributes on iOS TextInput when controlled component value specified using `value` instead of `children` Reviewed By: cipolleschi Differential Revision: D65108163 fbshipit-source-id: 499fe28439fabd2579eca6ded7fd13fd8ea2e43e
…nent value specified using `value` instead of `children` (#47269) Summary: Pull Request resolved: #47269 There were [reports](reactwg/react-native-releases#595) that patching in the fixes for iOS controlled input did not work as expected. I think tracked this down to a difference in how I tested, where the controlled component I used passed value as a child of the `TextInput`, instead of via `value`. Passing via `value` triggers a secondary bug, where we don't correctly pass a reference to correct ShadowView when creating attributedstring, specifically in the iOS TextInputShadowNode impl. We previously passed nothing for the ShadowView (only the first two struct fields). This was exposed in D52589303 which enabled `-Wextra`, but there, I went with same behavior of passing empty ShadowView, instead of the correct behavior (like Android impl) of passing a ShadowView of the current ShadowNode. After fixing this, we now correctly create event emitters in the passed attributedstring, which matches expectations for pargraph-level eventemitter now in typing attributes. We don't seem actually use this on iOS for TextInput right now (just Text), but this is likely the right foundation for events regardless. Changelog: [iOS][Fixed] - Fix missing emitter attributes on iOS TextInput when controlled component value specified using `value` instead of `children` Reviewed By: cipolleschi Differential Revision: D65108163 fbshipit-source-id: 499fe28439fabd2579eca6ded7fd13fd8ea2e43e
Target Branch(es)
0.76
Link to commit or PR to be picked
facebook/react-native#46970
facebook/react-native@557e344
and facebook/react-native#47269.
Description
A long standing bug with TextInput has been fixed in New Arch in the aforementioned PR. The bug manifested as many different issues, requiring various workarounds. As of 0.76, at least one of these workarounds no longer works in New Arch (facebook/react-native#29572 (comment)).
Related issues:
facebook/react-native#29572
facebook/react-native#42792
facebook/react-native#27693
... and likely others.
The text was updated successfully, but these errors were encountered: