mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
15dda0ab5a
Summary: Multiline `TextInput` can crash when really long texts are inserted and removed quickly. This is caused by the fact that [`-[NSAttributedString string]`](https://developer.apple.com/documentation/foundation/nsattributedstring/1412616-string?language=objc) doesn't really return a copy, and may mutate the string while it is being used by `convertIdToFollyDynamic`. See https://github.com/microsoft/react-native-macos/pull/489#discussion_r451789471 for more details on the issue. This issue was originally reported in https://github.com/microsoft/react-native-macos/issues/486 and was fixed in https://github.com/microsoft/react-native-macos/pull/489. ## Changelog [iOS] [Fixed] - Fix multiline TextInput crash when inserting/removing lots of text Pull Request resolved: https://github.com/facebook/react-native/pull/29307 Test Plan: 1. Open RNTester > TextInput 2. Search for a multiline example 3. Copy some large text and paste it into the text input view 4. Remove some (or all) text 5. Repeat steps 3-4 Reviewed By: shergin Differential Revision: D22488854 Pulled By: JoshuaGross fbshipit-source-id: 6fab7818d68538450d93460361ff5934caf86c10