Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cap selection indices when text changes (#26680)
Summary: This PR #22723 cached selections, so if you had a cached selection indicies, but updated the text to be an empty string, then this would crash. As reported in #25265 and other issues of `setSpan(4 ... 4) ends beyond length` ## Changelog [Android] [fixed] - Crash in TextInput Pull Request resolved: #26680 Test Plan: ``` input.setNativeProps({ text: "xxx", selection: {"begin": 0, "end": 3}}); input.setNativeProps({ text: ""}); ``` Differential Revision: D18189703 Pulled By: cpojer fbshipit-source-id: 67d9615a863fd22598be8d6d4553dec5ac8837ed
- Loading branch information