Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix missing emitter attributes on iOS TextInput when controlled compo…
…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
- Loading branch information