Commit eb08f54
Update RCTTextInputComponentView to recycle and properly clean the inputAccessoryView dependency. (#52825)
Summary:
Update `RCTTextInputComponentView` to recycle and properly clean its `inputAccessoryView` dependency. Currently, `RCTTextInputComponentView` does not clean up this dependency during recycling, which can result in the `inputAccessoryView` being incorrectly applied to `TextInput` components that do not use an accessory view."
Related issue: #52824
Snack of the issue: https://snack.expo.dev/arturkalach/privileged-blue-soda
https://github.com/user-attachments/assets/46a1f172-a75c-4e88-beee-059d4d2e1d0c
## Changelog:
[IOS][FIXED] Update recycling logic to clean up the `inputAccessoryView` dependency.
<!-- Help reviewers and the release process by writing your own changelog entry.
Pick one each for the category and type tags:
[ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message
For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
Pull Request resolved: #52825
Test Plan:
```
1. Render more than eight TextInput components on the screen, each with an AccessoryView.
2. Unmount the TextInput components using conditional rendering.
3. Open a Modal that contains a KeyboardAvoidingView and a TextInput.
4. Focus on the TextInput inside the Modal.
```
https://github.com/user-attachments/assets/8be1fdef-e8ab-4030-a2c5-e952c22ef743
Reviewed By: christophpurrer
Differential Revision: D78966221
Pulled By: cipolleschi
fbshipit-source-id: 35b6748cc44c41056051b2eecd626d61c4641cdf1 parent cda32c3 commit eb08f54
File tree
1 file changed
+3
-0
lines changed- packages/react-native/React/Fabric/Mounting/ComponentViews/TextInput
1 file changed
+3
-0
lines changedLines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
377 | 377 | | |
378 | 378 | | |
379 | 379 | | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
380 | 383 | | |
381 | 384 | | |
382 | 385 | | |
| |||
0 commit comments