Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix incorrect measurement of TextInput (#42655)
Summary: Pull Request resolved: #42655 This bug is caused by a caching issue: when the user enters a new character into the textInput: ReactTextInput 1) caches the Spannable entered by the user and 2) it updates internal Fabric state, which triggers the measurement of the TextInput component using the cached Spannable. The problem is that the Spannable entered by the user has the wrong "styles" for the text input. Since measurement is using the cached Spannable, then the measurement of the TextInput ends up being is incorrect. In this diff I'm fixing the bug by updating the styles (lineHeight) of the cached spannable that is cached when the user updates the TextInput. The styles weren't updated correctly because mTextAttributes didn't have the proper style props set Changelog: [Android][Fixed] - Fix incorrect measurement of TextInput when new architecture is enabled Reviewed By: javache, sammy-SC Differential Revision: D52924982 fbshipit-source-id: ced9f2c348bdb9bf706028b1063858cebd5a071a
- Loading branch information