Files
react-native/packages
Mateo GuzmánandRiccardo Cipolleschi 73ffe1394f Paper: TextInput maxLength is not working in old arch (#48126)
Summary:
Fixes https://github.com/facebook/react-native/issues/47563

It seems like a regression from https://github.com/facebook/react-native/issues/45401, where it was aimed to fix `onChangeText` being called multiple times when changing the text programmatically in an input with the `multiline` prop set as true.

This PR reverts that partially, as the `maxLength` check is not being evaluated correctly before setting the text. Not reverting it completely as when removing the second part of the fix, the `onChangeText` gets called multiple times again.

## Changelog:

[IOS] [FIXED] - Fixing TextInput `maxLength` not working in old arch

Pull Request resolved: https://github.com/facebook/react-native/pull/48126

Test Plan:
The issue could be reproduced in the rn-tester. See my videos with the before and after the fix.

<details>
<summary>Before:</summary>

https://github.com/user-attachments/assets/86fd67eb-fc14-469a-a5f8-8e83b49f857c

</details>

<details>
<summary>After:</summary>

https://github.com/user-attachments/assets/368383b1-c1bd-4e0b-ac44-c78022462fa0

</details>

Reviewed By: cortinico

Differential Revision: D67025182

Pulled By: cipolleschi

fbshipit-source-id: 720c400eef362618106ae434aef421c7529214fe
2025-01-08 14:09:14 +00:00
..
2024-12-09 16:30:18 +00:00
2024-12-09 16:30:18 +00:00
2024-12-09 16:30:18 +00:00
2024-12-09 16:30:18 +00:00
2024-12-09 16:30:18 +00:00
2024-12-09 16:30:18 +00:00
2024-12-09 16:30:18 +00:00
2024-12-09 16:30:18 +00:00
2024-12-09 16:30:18 +00:00
2025-01-08 14:04:50 +00:00
2025-01-08 14:04:50 +00:00
2024-12-09 16:30:18 +00:00
2024-12-09 16:30:18 +00:00
2024-12-09 16:30:18 +00:00
2024-12-09 16:30:18 +00:00
2024-12-09 16:30:18 +00:00
2024-12-09 16:30:18 +00:00
2024-12-09 16:30:18 +00:00
2024-12-09 16:30:18 +00:00
2024-12-09 16:30:18 +00:00
2024-12-09 16:30:18 +00:00
2024-12-10 00:23:44 +00:00
2024-12-09 16:30:18 +00:00
2024-12-09 16:30:18 +00:00